Skip to content

Commit

Permalink
Add docs and update pyi files
Browse files Browse the repository at this point in the history
Signed-off-by: FedericoBruzzone <[email protected]>
  • Loading branch information
FedericoBruzzone committed Feb 12, 2025
1 parent 7de1312 commit 95c0166
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/api/pydigraph_api_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ the functions from the explicitly typed based on the data type.
rustworkx.digraph_betweenness_centrality
rustworkx.digraph_edge_betweenness_centrality
rustworkx.digraph_closeness_centrality
rustworkx.digraph_newman_weighted_closeness_centrality
rustworkx.digraph_eigenvector_centrality
rustworkx.digraph_katz_centrality
rustworkx.digraph_unweighted_average_shortest_path_length
Expand Down
1 change: 1 addition & 0 deletions docs/source/api/pygraph_api_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ typed API based on the data type.
rustworkx.graph_betweenness_centrality
rustworkx.graph_edge_betweenness_centrality
rustworkx.graph_closeness_centrality
rustworkx.graph_newman_weighted_closeness_centrality
rustworkx.graph_eigenvector_centrality
rustworkx.graph_katz_centrality
rustworkx.graph_unweighted_average_shortest_path_length
Expand Down
8 changes: 7 additions & 1 deletion rustworkx/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ from .rustworkx import digraph_edge_betweenness_centrality as digraph_edge_betwe
from .rustworkx import graph_edge_betweenness_centrality as graph_edge_betweenness_centrality
from .rustworkx import digraph_closeness_centrality as digraph_closeness_centrality
from .rustworkx import graph_closeness_centrality as graph_closeness_centrality
from .rustworkx import (
digraph_newman_weighted_closeness_centrality as digraph_newman_weighted_closeness_centrality,
)
from .rustworkx import (
graph_newman_weighted_closeness_centrality as graph_newman_weighted_closeness_centrality,
)
from .rustworkx import digraph_katz_centrality as digraph_katz_centrality
from .rustworkx import graph_katz_centrality as graph_katz_centrality
from .rustworkx import digraph_degree_centrality as digraph_degree_centrality
Expand Down Expand Up @@ -436,7 +442,7 @@ def is_subgraph_isomorphic(
def transitivity(graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]) -> float: ...
def core_number(graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]) -> int: ...
def complement(
graph: PyGraph[_S, _T] | PyDiGraph[_S, _T]
graph: PyGraph[_S, _T] | PyDiGraph[_S, _T],
) -> PyGraph[_S, _T | None] | PyDiGraph[_S, _T | None]: ...
def random_layout(
graph: PyGraph[_S, _T] | PyDiGraph[_S, _T],
Expand Down
12 changes: 12 additions & 0 deletions rustworkx/rustworkx.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ def graph_closeness_centrality(
graph: PyGraph[_S, _T],
wf_improved: bool = ...,
) -> CentralityMapping: ...
def digraph_newman_weighted_closeness_centrality(
graph: PyDiGraph[_S, _T],
weight_fn: Callable[[_T], float],
wf_improved: bool = ...,
default_weight: float = ...,
) -> CentralityMapping: ...
def graph_newman_weighted_closeness_centrality(
graph: PyGraph[_S, _T],
weight_fn: Callable[[_T], float],
wf_improved: bool = ...,
default_weight: float = ...,
) -> CentralityMapping: ...
def digraph_degree_centrality(
graph: PyDiGraph[_S, _T],
/,
Expand Down

0 comments on commit 95c0166

Please sign in to comment.