Bump networkx to 3.3 (#11727)

This commit is contained in:
github-actions[bot]
2024-10-08 10:44:50 +02:00
committed by GitHub
parent 1f4031cc96
commit d7e6cb8e1a
234 changed files with 1046 additions and 932 deletions

View File

@@ -11,16 +11,25 @@ networkx\.(convert_matrix\.)?from_pandas_edgelist
networkx\.(generators\.)?(random_clustered\.)?random_clustered_graph
networkx\.(relabel\.)?relabel_nodes
# Stubtest doesn't understand aliases of class-decorated methods (possibly https://github.com/python/mypy/issues/6700 )
# Stubtest doesn't understand aliases of class-decorated functions (possibly https://github.com/python/mypy/issues/6700 )
networkx\.(algorithms\.)?(centrality\.)?(current_flow_closeness\.)?information_centrality
networkx\.(generators\.)?(random_graphs\.)?binomial_graph
networkx\.(generators\.)?(random_graphs\.)?erdos_renyi_graph
networkx\.(algorithms\.(minors\.(contraction\.)?)?)?identified_nodes
networkx\.algorithms\.isomorphism\.isomorph\.faster_graph_could_be_isomorphic
networkx\.algorithms\.isomorphism\.isomorph\.fast_graph_could_be_isomorphic
networkx\.algorithms\.isomorphism\.isomorph\.graph_could_be_isomorphic
networkx\.algorithms\.flow\.maxflow\.default_flow_func
networkx\.algorithms\.[a-z_\.]+\.default_flow_func
networkx\.(algorithms\.(centrality\.(load\.)?)?)?load_centrality
networkx\.algorithms\.bipartite\.(matching\.)?maximum_matching
networkx\.algorithms\.bipartite\.(cluster\.)?clustering
# Stubtest says: "runtime argument "backend" has a default value of type None, which is
# incompatible with stub argument type builtins.str. This is often caused by overloads
# failing to account for explicitly passing in the default value."
# Which is true, but would require some way of concatenating `backend` to ParamSpec.kwargs
networkx\.(utils\.backends\.)?_dispatch\.__call__
networkx\.(utils\.)?(backends\.)?_dispatchable\.__call__
# TODO: stubtest does not like @cached_property https://github.com/python/mypy/issues/17625
# "is inconsistent, cannot reconcile @property on stub with runtime object"

View File

@@ -1,9 +1,9 @@
from typing_extensions import assert_type
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def some_method(int_p: int, str_p: str) -> float:
return 0.0

View File

@@ -1,4 +1,4 @@
version = "3.2.1"
version = "3.3"
upstream_repository = "https://github.com/networkx/networkx"
# requires a version of numpy with a `py.typed` file
# see https://github.com/python/typeshed/issues/12551

View File

@@ -10,7 +10,7 @@ from networkx.lazy_imports import _lazy_import as _lazy_import
from networkx.linalg import *
from networkx.readwrite import *
from networkx.relabel import *
from networkx.utils.backends import _dispatch as _dispatch
from networkx.utils import _clear_cache as _clear_cache, _dispatchable as _dispatchable, config as config
from . import (
algorithms as algorithms,

View File

@@ -1,10 +1,10 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def maximum_independent_set(G): ...
@_dispatch
@_dispatchable
def max_clique(G): ...
@_dispatch
@_dispatchable
def clique_removal(G): ...
@_dispatch
@_dispatchable
def large_clique_size(G): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def average_clustering(G, trials: int = 1000, seed: Incomplete | None = None): ...

View File

@@ -1,10 +1,10 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def local_node_connectivity(G, source, target, cutoff: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, cutoff: Incomplete | None = None): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def diameter(G, seed: Incomplete | None = None): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def min_weighted_dominating_set(G, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def min_edge_dominating_set(G): ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def k_components(G, min_density: float = 0.95): ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def min_maximal_matching(G): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def randomized_partitioning(G, seed: Incomplete | None = None, p: float = 0.5, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def one_exchange(G, initial_cut: Incomplete | None = None, seed: Incomplete | None = None, weight: Incomplete | None = None): ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def ramsey_R2(G): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def metric_closure(G, weight: str = "weight"): ...
@_dispatch
@_dispatchable
def steiner_tree(G, terminal_nodes, weight: str = "weight", method: Incomplete | None = None): ...

View File

@@ -1,18 +1,18 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def christofides(G, weight: str = "weight", tree: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def traveling_salesman_problem(
G, weight: str = "weight", nodes: Incomplete | None = None, cycle: bool = True, method: Incomplete | None = None
G, weight: str = "weight", nodes: Incomplete | None = None, cycle: bool = True, method: Incomplete | None = None, **kwargs
): ...
@_dispatch
@_dispatchable
def asadpour_atsp(G, weight: str = "weight", seed: Incomplete | None = None, source: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def greedy_tsp(G, weight: str = "weight", source: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def simulated_annealing_tsp(
G,
init_cycle,
@@ -26,7 +26,7 @@ def simulated_annealing_tsp(
alpha: float = 0.01,
seed: Incomplete | None = None,
): ...
@_dispatch
@_dispatchable
def threshold_accepting_tsp(
G,
init_cycle,

View File

@@ -1,12 +1,12 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["treewidth_min_degree", "treewidth_min_fill_in"]
@_dispatch
@_dispatchable
def treewidth_min_degree(G): ...
@_dispatch
@_dispatchable
def treewidth_min_fill_in(G): ...
class MinDegreeHeuristic:

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def min_weighted_vertex_cover(G, weight: Incomplete | None = None): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def average_degree_connectivity(
G, source: str = "in+out", target: str = "in+out", nodes: Incomplete | None = None, weight: Incomplete | None = None
): ...

View File

@@ -1,16 +1,16 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def degree_assortativity_coefficient(
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def degree_pearson_correlation_coefficient(
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def attribute_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def numeric_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ...

View File

@@ -1,18 +1,18 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def attribute_mixing_dict(G, attribute, nodes: Incomplete | None = None, normalized: bool = False): ...
@_dispatch
@_dispatchable
def attribute_mixing_matrix(
G, attribute, nodes: Incomplete | None = None, mapping: Incomplete | None = None, normalized: bool = True
): ...
@_dispatch
@_dispatchable
def degree_mixing_dict(
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None, normalized: bool = False
): ...
@_dispatch
@_dispatchable
def degree_mixing_matrix(
G,
x: str = "out",
@@ -22,5 +22,5 @@ def degree_mixing_matrix(
normalized: bool = True,
mapping: Incomplete | None = None,
): ...
@_dispatch
@_dispatchable
def mixing_dict(xy, normalized: bool = False): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def average_neighbor_degree(
G, source: str = "out", target: str = "out", nodes: Incomplete | None = None, weight: Incomplete | None = None
): ...

View File

@@ -1,11 +1,11 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def node_attribute_xy(G, attribute, nodes: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def node_degree_xy(
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None
) -> Generator[Incomplete, None, None]: ...

View File

@@ -1,6 +1,6 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def find_asteroidal_triple(G): ...
@_dispatch
@_dispatchable
def is_at_free(G): ...

View File

@@ -1,16 +1,16 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def color(G): ...
@_dispatch
@_dispatchable
def is_bipartite(G): ...
@_dispatch
@_dispatchable
def is_bipartite_node_set(G, nodes): ...
@_dispatch
@_dispatchable
def sets(G, top_nodes: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def density(B, nodes): ...
@_dispatch
@_dispatchable
def degrees(B, nodes, weight: Incomplete | None = None): ...

View File

@@ -1,8 +1,8 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def degree_centrality(G, nodes): ...
@_dispatch
@_dispatchable
def betweenness_centrality(G, nodes): ...
@_dispatch
@_dispatchable
def closeness_centrality(G, nodes, normalized: bool = True): ...

View File

@@ -1,13 +1,13 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def latapy_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ...
clustering = latapy_clustering
@_dispatch
@_dispatchable
def average_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ...
@_dispatch
@_dispatchable
def robins_alexander_clustering(G): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ...

View File

@@ -1,13 +1,13 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def write_edgelist(G, path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8") -> None: ...
@_dispatch
@_dispatchable
def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def parse_edgelist(
lines,
comments: str = "#",
@@ -16,7 +16,7 @@ def parse_edgelist(
nodetype: Incomplete | None = None,
data: bool = True,
): ...
@_dispatch
@_dispatchable
def read_edgelist(
path,
comments: str = "#",

View File

@@ -1,20 +1,20 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def complete_bipartite_graph(n1, n2, create_using: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def configuration_model(aseq, bseq, create_using: Incomplete | None = None, seed: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def reverse_havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def alternating_havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def preferential_attachment_graph(aseq, p, create_using: Incomplete | None = None, seed: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def random_graph(n, m, p, seed: Incomplete | None = None, directed: bool = False): ...
@_dispatch
@_dispatchable
def gnmk_random_graph(n, m, k, seed: Incomplete | None = None, directed: bool = False): ...

View File

@@ -1,15 +1,15 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def hopcroft_karp_matching(G, top_nodes: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def eppstein_matching(G, top_nodes: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def to_vertex_cover(G, matching, top_nodes: Incomplete | None = None): ...
maximum_matching = hopcroft_karp_matching
@_dispatch
@_dispatchable
def minimum_weight_full_matching(G, top_nodes: Incomplete | None = None, weight: str = "weight"): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def biadjacency_matrix(
G,
row_order,
@@ -11,5 +11,5 @@ def biadjacency_matrix(
weight: str = "weight",
format: str = "csr",
): ...
@_dispatch
@_dispatchable
def from_biadjacency_matrix(A, create_using: Incomplete | None = None, edge_attribute: str = "weight"): ...

View File

@@ -1,14 +1,14 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def projected_graph(B, nodes, multigraph: bool = False): ...
@_dispatch
@_dispatchable
def weighted_projected_graph(B, nodes, ratio: bool = False): ...
@_dispatch
@_dispatchable
def collaboration_weighted_projected_graph(B, nodes): ...
@_dispatch
@_dispatchable
def overlap_weighted_projected_graph(B, nodes, jaccard: bool = True): ...
@_dispatch
@_dispatchable
def generic_weighted_projected_graph(B, nodes, weight_function: Incomplete | None = None): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def node_redundancy(G, nodes: Incomplete | None = None): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def spectral_bipartivity(G, nodes: Incomplete | None = None, weight: str = "weight"): ...

View File

@@ -3,7 +3,7 @@ from collections.abc import Generator, Iterable
from typing import Literal, TypeVar, overload
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
_U = TypeVar("_U")
@@ -111,5 +111,5 @@ def edge_boundary(
keys: Literal[True],
default: _U | None = None,
) -> Generator[tuple[_Node, _Node, int, dict[str, _U]], None, None]: ...
@_dispatch
@_dispatchable
def node_boundary(G: Graph[_Node], nbunch1: Iterable[_Node], nbunch2: Iterable[_Node] | None = None) -> set[_Node]: ...

View File

@@ -3,11 +3,11 @@ from collections.abc import Callable, Generator
from typing import Literal, overload
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def bridges(G: Graph[_Node], root: _Node | None = None) -> Generator[_Node, None, None]: ...
@_dispatch
@_dispatchable
def has_bridges(G: Graph[_Node], root: Incomplete | None = None) -> bool: ...
@overload
def local_bridges(

View File

@@ -0,0 +1,9 @@
import networkx as nx
from networkx.classes.graph import Graph, _Node
__all__ = ["tree_broadcast_center", "tree_broadcast_time"]
@nx._dispatchable
def tree_broadcast_center(G: Graph[_Node]) -> tuple[int, set[_Node]]: ...
@nx._dispatchable
def tree_broadcast_time(G: Graph[_Node], node: int | None = None) -> int: ...

View File

@@ -1,10 +1,10 @@
from _typeshed import Incomplete
from networkx.classes.graph import Graph, _Edge, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
from numpy.random import RandomState
@_dispatch
@_dispatchable
def betweenness_centrality(
G: Graph[_Node],
k: int | None = None,
@@ -13,7 +13,7 @@ def betweenness_centrality(
endpoints: bool = False,
seed: int | RandomState | None = None,
) -> dict[_Node, float]: ...
@_dispatch
@_dispatchable
def edge_betweenness_centrality(
G: Graph[_Node], k: int | None = None, normalized: bool = True, weight: str | None = None, seed: Incomplete | None = None
) -> dict[_Edge[_Node], float]: ...

View File

@@ -1,13 +1,13 @@
from collections.abc import Iterable
from networkx.classes.graph import Graph, _Edge, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def betweenness_centrality_subset(
G: Graph[_Node], sources: Iterable[_Node], targets: Iterable[_Node], normalized: bool = False, weight: str | None = None
) -> dict[_Node, float]: ...
@_dispatch
@_dispatchable
def edge_betweenness_centrality_subset(
G: Graph[_Node], sources: Iterable[_Node], targets: Iterable[_Node], normalized: bool = False, weight: str | None = None
) -> dict[_Edge[_Node], float]: ...

View File

@@ -1,13 +1,13 @@
from _typeshed import SupportsKeysAndGetItem
from networkx.classes.graph import Graph, _Edge, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def closeness_centrality(
G: Graph[_Node], u: _Node | None = None, distance: str | None = None, wf_improved: bool = True
) -> dict[_Node, float]: ...
@_dispatch
@_dispatchable
def incremental_closeness_centrality(
G: Graph[_Node],
edge: _Edge[_Node],

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def approximate_current_flow_betweenness_centrality(
G,
normalized: bool = True,
@@ -13,11 +13,11 @@ def approximate_current_flow_betweenness_centrality(
kmax: int = 10000,
seed: Incomplete | None = None,
): ...
@_dispatch
@_dispatchable
def current_flow_betweenness_centrality(
G, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "full"
): ...
@_dispatch
@_dispatchable
def edge_current_flow_betweenness_centrality(
G, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "full"
): ...

View File

@@ -1,12 +1,12 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def current_flow_betweenness_centrality_subset(
G, sources, targets, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "lu"
): ...
@_dispatch
@_dispatchable
def edge_current_flow_betweenness_centrality_subset(
G, sources, targets, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "lu"
): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def current_flow_closeness_centrality(G, weight: Incomplete | None = None, dtype=..., solver: str = "lu"): ...
information_centrality = current_flow_closeness_centrality

View File

@@ -1,9 +1,9 @@
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ...
@_dispatch
@_dispatchable
def in_degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ...
@_dispatch
@_dispatchable
def out_degree_centrality(G: Graph[_Node]) -> dict[_Node, float]: ...

View File

@@ -1,7 +1,7 @@
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def dispersion(
G: Graph[_Node],
u: _Node | None = None,

View File

@@ -1,10 +1,10 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def eigenvector_centrality(
G, max_iter: int = 100, tol: float = 1e-06, nstart: Incomplete | None = None, weight: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def eigenvector_centrality_numpy(G, weight: Incomplete | None = None, max_iter: int = 50, tol: float = 0): ...

View File

@@ -1,9 +1,9 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def flow_matrix_row(G, weight: Incomplete | None = None, dtype=..., solver: str = "lu") -> Generator[Incomplete, None, None]: ...
class InverseLaplacian:

View File

@@ -1,10 +1,10 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def group_betweenness_centrality(G, C, normalized: bool = True, weight: Incomplete | None = None, endpoints: bool = False): ...
@_dispatch
@_dispatchable
def prominent_group(
G,
k,
@@ -14,11 +14,11 @@ def prominent_group(
normalized: bool = True,
greedy: bool = False,
): ...
@_dispatch
@_dispatchable
def group_closeness_centrality(G, S, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def group_degree_centrality(G, S): ...
@_dispatch
@_dispatchable
def group_in_degree_centrality(G, S): ...
@_dispatch
@_dispatchable
def group_out_degree_centrality(G, S): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def harmonic_centrality(
G, nbunch: Incomplete | None = None, distance: Incomplete | None = None, sources: Incomplete | None = None
): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def katz_centrality(
G,
alpha: float = 0.1,
@@ -13,7 +13,7 @@ def katz_centrality(
normalized: bool = True,
weight: Incomplete | None = None,
): ...
@_dispatch
@_dispatchable
def katz_centrality_numpy(
G, alpha: float = 0.1, beta: float = 1.0, normalized: bool = True, weight: Incomplete | None = None
): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def laplacian_centrality(
G,
normalized: bool = True,

View File

@@ -1,15 +1,15 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["load_centrality", "edge_load_centrality"]
@_dispatch
@_dispatchable
def newman_betweenness_centrality(
G, v: Incomplete | None = None, cutoff: Incomplete | None = None, normalized: bool = True, weight: Incomplete | None = None
): ...
load_centrality = newman_betweenness_centrality
@_dispatch
@_dispatchable
def edge_load_centrality(G, cutoff: bool = False): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def percolation_centrality(
G, attribute: str = "percolation", states: Incomplete | None = None, weight: Incomplete | None = None
): ...

View File

@@ -1,10 +1,10 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def global_reaching_centrality(G, weight: Incomplete | None = None, normalized: bool = True): ...
@_dispatch
@_dispatchable
def local_reaching_centrality(
G, v, paths: Incomplete | None = None, weight: Incomplete | None = None, normalized: bool = True
): ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def second_order_centrality(G): ...

View File

@@ -1,10 +1,10 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def subgraph_centrality_exp(G): ...
@_dispatch
@_dispatchable
def subgraph_centrality(G): ...
@_dispatch
@_dispatchable
def communicability_betweenness_centrality(G): ...
@_dispatch
@_dispatchable
def estrada_index(G): ...

View File

@@ -1,8 +1,8 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def trophic_levels(G, weight: str = "weight"): ...
@_dispatch
@_dispatchable
def trophic_differences(G, weight: str = "weight"): ...
@_dispatch
@_dispatchable
def trophic_incoherence_parameter(G, weight: str = "weight", cannibalism: bool = False): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def voterank(G, number_of_nodes: Incomplete | None = None): ...

View File

@@ -1,7 +1,7 @@
from collections.abc import Generator
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def chain_decomposition(G: Graph[_Node], root: _Node | None = None) -> Generator[list[tuple[_Node, _Node]], None, None]: ...

View File

@@ -3,15 +3,15 @@ from collections.abc import Generator, Hashable
from networkx.classes.graph import Graph, _Node
from networkx.exception import NetworkXException
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
class NetworkXTreewidthBoundExceeded(NetworkXException): ...
@_dispatch
@_dispatchable
def is_chordal(G: Graph[Hashable]) -> bool: ...
@_dispatch
@_dispatchable
def find_induced_nodes(G: Graph[_Node], s: _Node, t: _Node, treewidth_bound: float = sys.maxsize) -> set[_Node]: ...
@_dispatch
@_dispatchable
def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node], None, None]: ...
@_dispatch
@_dispatchable
def chordal_graph_treewidth(G: Graph[Hashable]) -> int: ...

View File

@@ -3,17 +3,17 @@ from collections.abc import Generator, Iterable, Iterator, Sized
from typing import overload
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def enumerate_all_cliques(G: Graph[_Node]) -> Generator[list[_Node], None, None]: ...
@_dispatch
@_dispatchable
def find_cliques(G: Graph[_Node], nodes: SupportsGetItem[slice, _Node] | None = None) -> Generator[list[_Node], None, None]: ...
@_dispatch
@_dispatchable
def find_cliques_recursive(G: Graph[_Node], nodes: SupportsGetItem[slice, _Node] | None = None) -> Iterator[list[_Node]]: ...
@_dispatch
@_dispatchable
def make_max_clique_graph(G: Graph[_Node], create_using: type[Graph[_Node]] | None = None) -> Graph[_Node]: ...
@_dispatch
@_dispatchable
def make_clique_bipartite(
G: Graph[_Node], fpos: Unused = None, create_using: type[Graph[_Node]] | None = None, name: Unused = None
) -> Graph[_Node]: ...

View File

@@ -1,16 +1,16 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def triangles(G, nodes: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def average_clustering(G, nodes: Incomplete | None = None, weight: Incomplete | None = None, count_zeros: bool = True): ...
@_dispatch
@_dispatchable
def clustering(G, nodes: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def transitivity(G): ...
@_dispatch
@_dispatchable
def square_clustering(G, nodes: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def generalized_degree(G, nodes: Incomplete | None = None): ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def equitable_color(G, num_colors): ...

View File

@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = [
"greedy_color",
@@ -15,23 +15,23 @@ __all__ = [
"strategy_smallest_last",
]
@_dispatch
@_dispatchable
def strategy_largest_first(G, colors): ...
@_dispatch
@_dispatchable
def strategy_random_sequential(G, colors, seed: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def strategy_smallest_last(G, colors): ...
@_dispatch
@_dispatchable
def strategy_independent_set(G, colors) -> Generator[Incomplete, Incomplete, None]: ...
@_dispatch
@_dispatchable
def strategy_connected_sequential_bfs(G, colors): ...
@_dispatch
@_dispatchable
def strategy_connected_sequential_dfs(G, colors): ...
@_dispatch
@_dispatchable
def strategy_connected_sequential(G, colors, traversal: str = "bfs") -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def strategy_saturation_largest_first(G, colors) -> Generator[Incomplete, None, Incomplete]: ...
@_dispatch
@_dispatchable
def greedy_color(G, strategy: str = "largest_first", interchange: bool = False): ...
class _Node:

View File

@@ -1,6 +1,6 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def communicability(G): ...
@_dispatch
@_dispatchable
def communicability_exp(G): ...

View File

@@ -1,6 +1,7 @@
from networkx.algorithms.community.asyn_fluid import *
from networkx.algorithms.community.centrality import *
from networkx.algorithms.community.community_utils import *
from networkx.algorithms.community.divisive import *
from networkx.algorithms.community.kclique import *
from networkx.algorithms.community.kernighan_lin import *
from networkx.algorithms.community.label_propagation import *

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def asyn_fluidc(G, k, max_iter: int = 100, seed: Incomplete | None = None): ...

View File

@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def girvan_newman(G, most_valuable_edge: Incomplete | None = None) -> Generator[Incomplete, None, Incomplete]: ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def is_partition(G, communities): ...

View File

@@ -0,0 +1,10 @@
from _typeshed import Incomplete
import networkx as nx
__all__ = ["edge_betweenness_partition", "edge_current_flow_betweenness_partition"]
@nx._dispatchable
def edge_betweenness_partition(G, number_of_sets: int, *, weight: Incomplete | None = None) -> list[Incomplete]: ...
@nx._dispatchable
def edge_current_flow_betweenness_partition(G, number_of_sets: int, *, weight: Incomplete | None = None) -> list[Incomplete]: ...

View File

@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def k_clique_communities(G, k, cliques: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def kernighan_lin_bisection(
G, partition: Incomplete | None = None, max_iter: int = 10, weight: str = "weight", seed: Incomplete | None = None
): ...

View File

@@ -1,11 +1,11 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def asyn_lpa_communities(
G, weight: Incomplete | None = None, seed: Incomplete | None = None
) -> Generator[Incomplete, Incomplete, None]: ...
@_dispatch
@_dispatchable
def label_propagation_communities(G): ...

View File

@@ -1,13 +1,13 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def louvain_communities(
G, weight: str = "weight", resolution: float = 1, threshold: float = 1e-07, seed: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def louvain_partitions(
G, weight: str = "weight", resolution: float = 1, threshold: float = 1e-07, seed: Incomplete | None = None
) -> Generator[Incomplete, None, None]: ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def lukes_partitioning(G, max_size, node_weight: Incomplete | None = None, edge_weight: Incomplete | None = None): ...

View File

@@ -1,10 +1,10 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def greedy_modularity_communities(
G, weight: Incomplete | None = None, resolution: float = 1, cutoff: int = 1, best_n: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def naive_greedy_modularity_communities(G, resolution: float = 1, weight: Incomplete | None = None): ...

View File

@@ -1,12 +1,12 @@
from networkx.exception import NetworkXError
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["modularity", "partition_quality"]
class NotAPartition(NetworkXError):
def __init__(self, G, collection) -> None: ...
@_dispatch
@_dispatchable
def modularity(G, communities, weight: str = "weight", resolution: float = 1): ...
@_dispatch
@_dispatchable
def partition_quality(G, partition): ...

View File

@@ -1,11 +1,11 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def attracting_components(G) -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def number_attracting_components(G): ...
@_dispatch
@_dispatchable
def is_attracting_component(G): ...

View File

@@ -1,13 +1,13 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def is_biconnected(G): ...
@_dispatch
@_dispatchable
def biconnected_component_edges(G) -> Generator[Incomplete, Incomplete, None]: ...
@_dispatch
@_dispatchable
def biconnected_components(G) -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def articulation_points(G) -> Generator[Incomplete, None, None]: ...

View File

@@ -1,13 +1,13 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def connected_components(G) -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def number_connected_components(G): ...
@_dispatch
@_dispatchable
def is_connected(G): ...
@_dispatch
@_dispatchable
def node_connected_component(G, n): ...

View File

@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def is_semiconnected(G, topo_order: Incomplete | None = None): ...

View File

@@ -2,17 +2,17 @@ from collections.abc import Generator, Hashable, Iterable
from networkx.classes.digraph import DiGraph
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def strongly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ...
@_dispatch
@_dispatchable
def kosaraju_strongly_connected_components(G: Graph[_Node], source: _Node | None = None) -> Generator[set[_Node], None, None]: ...
@_dispatch
@_dispatchable
def strongly_connected_components_recursive(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ...
@_dispatch
@_dispatchable
def number_strongly_connected_components(G: Graph[Hashable]) -> int: ...
@_dispatch
@_dispatchable
def is_strongly_connected(G: Graph[Hashable]) -> bool: ...
@_dispatch
@_dispatchable
def condensation(G: DiGraph[_Node], scc: Iterable[Iterable[_Node]] | None = None) -> DiGraph[int]: ...

View File

@@ -1,11 +1,11 @@
from collections.abc import Generator, Hashable
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def weakly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ...
@_dispatch
@_dispatchable
def number_weakly_connected_components(G: Graph[Hashable]) -> int: ...
@_dispatch
@_dispatchable
def is_weakly_connected(G: Graph[Hashable]) -> bool: ...

View File

@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from networkx.algorithms.flow import edmonds_karp
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = [
"average_node_connectivity",
@@ -14,7 +14,7 @@ __all__ = [
default_flow_func = edmonds_karp
@_dispatch
@_dispatchable
def local_node_connectivity(
G,
s,
@@ -24,13 +24,13 @@ def local_node_connectivity(
residual: Incomplete | None = None,
cutoff: Incomplete | None = None,
): ...
@_dispatch
@_dispatchable
def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def average_node_connectivity(G, flow_func: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, flow_func: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def local_edge_connectivity(
G,
s,
@@ -40,7 +40,7 @@ def local_edge_connectivity(
residual: Incomplete | None = None,
cutoff: Incomplete | None = None,
): ...
@_dispatch
@_dispatchable
def edge_connectivity(
G,
s: Incomplete | None = None,

View File

@@ -1,21 +1,21 @@
from _typeshed import Incomplete
from networkx.algorithms.flow import edmonds_karp
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["minimum_st_node_cut", "minimum_node_cut", "minimum_st_edge_cut", "minimum_edge_cut"]
default_flow_func = edmonds_karp
@_dispatch
@_dispatchable
def minimum_st_edge_cut(
G, s, t, flow_func: Incomplete | None = None, auxiliary: Incomplete | None = None, residual: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def minimum_st_node_cut(
G, s, t, flow_func: Incomplete | None = None, auxiliary: Incomplete | None = None, residual: Incomplete | None = None
): ...
@_dispatch
@_dispatchable
def minimum_node_cut(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def minimum_edge_cut(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ...

View File

@@ -2,13 +2,13 @@ from _typeshed import Incomplete
from collections.abc import Generator
from networkx.algorithms.flow import edmonds_karp
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["edge_disjoint_paths", "node_disjoint_paths"]
default_flow_func = edmonds_karp
@_dispatch
@_dispatchable
def edge_disjoint_paths(
G,
s,
@@ -18,7 +18,7 @@ def edge_disjoint_paths(
auxiliary: Incomplete | None = None,
residual: Incomplete | None = None,
) -> Generator[Incomplete, None, None]: ...
@_dispatch
@_dispatchable
def node_disjoint_paths(
G,
s,

View File

@@ -1,13 +1,13 @@
from collections.abc import Generator, Hashable
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def is_k_edge_connected(G: Graph[Hashable], k: int): ...
@_dispatch
@_dispatchable
def is_locally_k_edge_connected(G, s, t, k): ...
@_dispatch
@_dispatchable
def k_edge_augmentation(
G: Graph[_Node],
k: int,

View File

@@ -1,13 +1,13 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def k_edge_components(G, k): ...
@_dispatch
@_dispatchable
def k_edge_subgraphs(G, k): ...
@_dispatch
@_dispatchable
def bridge_components(G) -> Generator[Incomplete, Incomplete, None]: ...
class EdgeComponentAuxGraph:

View File

@@ -1,11 +1,11 @@
from _typeshed import Incomplete
from networkx.algorithms.flow import edmonds_karp
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["k_components"]
default_flow_func = edmonds_karp
@_dispatch
@_dispatchable
def k_components(G, flow_func: Incomplete | None = None): ...

View File

@@ -2,11 +2,11 @@ from _typeshed import Incomplete
from collections.abc import Generator
from networkx.algorithms.flow import edmonds_karp
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
__all__ = ["all_node_cuts"]
default_flow_func = edmonds_karp
@_dispatch
@_dispatchable
def all_node_cuts(G, k: Incomplete | None = None, flow_func: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...

View File

@@ -1,4 +1,4 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def stoer_wagner(G, weight: str = "weight", heap=...): ...

View File

@@ -1,6 +1,6 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def build_auxiliary_node_connectivity(G): ...
@_dispatch
@_dispatchable
def build_auxiliary_edge_connectivity(G): ...

View File

@@ -1,18 +1,18 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def core_number(G): ...
@_dispatch
@_dispatchable
def k_core(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def k_shell(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def k_crust(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def k_corona(G, k, core_number: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def k_truss(G, k): ...
@_dispatch
@_dispatchable
def onion_layers(G): ...

View File

@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def is_edge_cover(G, cover): ...

View File

@@ -1,20 +1,20 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def cut_size(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def volume(G, S, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def normalized_cut_size(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def conductance(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def edge_expansion(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def mixing_expansion(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def node_expansion(G, S): ...
@_dispatch
@_dispatchable
def boundary_expansion(G, S): ...

View File

@@ -1,11 +1,11 @@
from _typeshed import Incomplete
from collections.abc import Generator
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def cycle_basis(G, root: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def simple_cycles(G, length_bound: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ...
class _NeighborhoodCache(dict[Incomplete, Incomplete]):
@@ -13,11 +13,11 @@ class _NeighborhoodCache(dict[Incomplete, Incomplete]):
def __init__(self, G) -> None: ...
def __missing__(self, v): ...
@_dispatch
@_dispatchable
def chordless_cycles(G, length_bound: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ...
@_dispatch
@_dispatchable
def recursive_simple_cycles(G): ...
@_dispatch
@_dispatchable
def find_cycle(G, source: Incomplete | None = None, orientation: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def minimum_cycle_basis(G, weight: Incomplete | None = None): ...

View File

@@ -1,8 +1,8 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def d_separated(G, x, y, z): ...
@_dispatch
@_dispatchable
def minimal_d_separator(G, u, v): ...
@_dispatch
@_dispatchable
def is_minimal_d_separator(G, u, v, z): ...

View File

@@ -3,39 +3,39 @@ from collections.abc import Callable, Generator, Iterable, Reversible
from networkx.classes.digraph import DiGraph
from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def descendants(G: Graph[_Node], source: _Node) -> set[_Node]: ...
@_dispatch
@_dispatchable
def ancestors(G: Graph[_Node], source: _Node) -> set[_Node]: ...
@_dispatch
@_dispatchable
def is_directed_acyclic_graph(G: Graph[_Node]) -> bool: ...
@_dispatch
@_dispatchable
def topological_generations(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ...
@_dispatch
@_dispatchable
def topological_sort(G: DiGraph[_Node]) -> Generator[_Node, None, None]: ...
@_dispatch
@_dispatchable
def lexicographical_topological_sort(
G: DiGraph[_Node], key: Callable[[_Node], SupportsRichComparison] | None = None
) -> Generator[_Node, None, None]: ...
@_dispatch
@_dispatchable
def all_topological_sorts(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ...
@_dispatch
@_dispatchable
def is_aperiodic(G: DiGraph[_Node]) -> bool: ...
@_dispatch
@_dispatchable
def transitive_closure(G: Graph[_Node], reflexive: bool = False) -> Graph[_Node]: ...
@_dispatch
@_dispatchable
def transitive_closure_dag(G: DiGraph[_Node], reflexive: bool = False) -> DiGraph[_Node]: ...
@_dispatch
@_dispatchable
def transitive_reduction(G: DiGraph[_Node]) -> DiGraph[_Node]: ...
@_dispatch
@_dispatchable
def antichains(G: DiGraph[_Node], topo_order: Reversible[_Node] | None = None) -> Generator[list[_Node], None, None]: ...
@_dispatch
@_dispatchable
def dag_longest_path(
G: DiGraph[_Node], weight: str = "weight", default_weight: int = 1, topo_order: Iterable[_Node] | None = None
) -> list[_Node]: ...
@_dispatch
@_dispatchable
def dag_longest_path_length(G: DiGraph[_Node], weight: str = "weight", default_weight: int = 1) -> int: ...
@_dispatch
@_dispatchable
def dag_to_branching(G: Graph[_Node]) -> Graph[_Node]: ...

View File

@@ -1,18 +1,18 @@
from _typeshed import Incomplete
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def eccentricity(G, v: Incomplete | None = None, sp: Incomplete | None = None, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def diameter(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def periphery(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def radius(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def center(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def barycenter(G, weight: Incomplete | None = None, attr: Incomplete | None = None, sp: Incomplete | None = None): ...
@_dispatch
@_dispatchable
def resistance_distance(G, nodeA, nodeB, weight: Incomplete | None = None, invert_weight: bool = True): ...

View File

@@ -1,10 +1,10 @@
from networkx.utils.backends import _dispatch
from networkx.utils.backends import _dispatchable
@_dispatch
@_dispatchable
def is_distance_regular(G): ...
@_dispatch
@_dispatchable
def global_parameters(b, c): ...
@_dispatch
@_dispatchable
def intersection_array(G): ...
@_dispatch
@_dispatchable
def is_strongly_regular(G): ...

Some files were not shown because too many files have changed in this diff Show More