mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-02 22:18:28 +08:00
Extract NetworkX types from docstrings (#13458)
This commit is contained in:
@@ -30,6 +30,7 @@ from networkx.algorithms.bipartite import (
|
||||
)
|
||||
from networkx.algorithms.boundary import *
|
||||
from networkx.algorithms.bridges import *
|
||||
from networkx.algorithms.broadcasting import *
|
||||
from networkx.algorithms.centrality import *
|
||||
from networkx.algorithms.chains import *
|
||||
from networkx.algorithms.chordal import *
|
||||
@@ -116,6 +117,7 @@ from networkx.algorithms.sparsifiers import *
|
||||
from networkx.algorithms.structuralholes import *
|
||||
from networkx.algorithms.summarization import *
|
||||
from networkx.algorithms.swap import *
|
||||
from networkx.algorithms.time_dependent import *
|
||||
from networkx.algorithms.traversal import *
|
||||
from networkx.algorithms.tree.branchings import (
|
||||
ArborescenceIterator as ArborescenceIterator,
|
||||
@@ -132,4 +134,5 @@ from networkx.algorithms.tree.recognition import *
|
||||
from networkx.algorithms.triads import *
|
||||
from networkx.algorithms.vitality import *
|
||||
from networkx.algorithms.voronoi import *
|
||||
from networkx.algorithms.walks import *
|
||||
from networkx.algorithms.wiener import *
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def maximum_independent_set(G): ...
|
||||
def maximum_independent_set(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def max_clique(G): ...
|
||||
def max_clique(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def clique_removal(G): ...
|
||||
def clique_removal(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def large_clique_size(G): ...
|
||||
def large_clique_size(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def average_clustering(G, trials: int = 1000, seed: Incomplete | None = None): ...
|
||||
def average_clustering(G: Graph[_Node], trials: int = 1000, seed: int | RandomState | None = None): ...
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def local_node_connectivity(G, source, target, cutoff: Incomplete | None = None): ...
|
||||
def local_node_connectivity(G: Graph[_Node], source: _Node, target: _Node, cutoff: int | None = None): ...
|
||||
@_dispatchable
|
||||
def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None): ...
|
||||
def node_connectivity(G: Graph[_Node], s: _Node | None = None, t: _Node | None = None): ...
|
||||
@_dispatchable
|
||||
def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, cutoff: Incomplete | None = None): ...
|
||||
def all_pairs_node_connectivity(G: Graph[_Node], nbunch: Iterable[Incomplete] | None = None, cutoff: int | None = None): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def diameter(G, seed: Incomplete | None = None): ...
|
||||
def diameter(G: Graph[_Node], seed: int | RandomState | None = None): ...
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def min_weighted_dominating_set(G, weight: Incomplete | None = None): ...
|
||||
def min_weighted_dominating_set(G: Graph[_Node], weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def min_edge_dominating_set(G): ...
|
||||
def min_edge_dominating_set(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def k_components(G, min_density: float = 0.95): ...
|
||||
def k_components(G: Graph[_Node], min_density: float = 0.95): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def min_maximal_matching(G): ...
|
||||
def min_maximal_matching(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def randomized_partitioning(G, seed: Incomplete | None = None, p: float = 0.5, weight: Incomplete | None = None): ...
|
||||
def randomized_partitioning(
|
||||
G: Graph[_Node], seed: int | RandomState | None = None, p: float = 0.5, weight: str | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def one_exchange(G, initial_cut: Incomplete | None = None, seed: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def one_exchange(
|
||||
G: Graph[_Node], initial_cut: set[Incomplete] | None = None, seed: int | RandomState | None = None, weight: str | None = None
|
||||
): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def ramsey_R2(G): ...
|
||||
def ramsey_R2(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def metric_closure(G, weight: str = "weight"): ...
|
||||
def metric_closure(G: Graph[_Node], weight="weight"): ...
|
||||
@_dispatchable
|
||||
def steiner_tree(G, terminal_nodes, weight: str = "weight", method: Incomplete | None = None): ...
|
||||
def steiner_tree(G: Graph[_Node], terminal_nodes: Iterable[Incomplete], weight: str = "weight", method: str | None = None): ...
|
||||
|
||||
@@ -1,41 +1,51 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def christofides(G, weight: str = "weight", tree: Incomplete | None = None): ...
|
||||
def christofides(G: Graph[_Node], weight: str | None = "weight", tree: Graph[_Node] | None = None): ...
|
||||
@_dispatchable
|
||||
def traveling_salesman_problem(
|
||||
G, weight: str = "weight", nodes: Incomplete | None = None, cycle: bool = True, method: Incomplete | None = None, **kwargs
|
||||
G: Graph[_Node],
|
||||
weight: str = "weight",
|
||||
nodes=None,
|
||||
cycle: bool = True,
|
||||
method: Callable[..., Incomplete] | None = None,
|
||||
**kwargs,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def asadpour_atsp(G, weight: str = "weight", seed: Incomplete | None = None, source: Incomplete | None = None): ...
|
||||
def asadpour_atsp(
|
||||
G: DiGraph[_Node], weight: str | None = "weight", seed: int | RandomState | None = None, source: str | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def greedy_tsp(G, weight: str = "weight", source: Incomplete | None = None): ...
|
||||
def greedy_tsp(G: Graph[_Node], weight: str | None = "weight", source=None): ...
|
||||
@_dispatchable
|
||||
def simulated_annealing_tsp(
|
||||
G,
|
||||
G: Graph[_Node],
|
||||
init_cycle,
|
||||
weight: str = "weight",
|
||||
source: Incomplete | None = None,
|
||||
# docstring says int, but it can be a float and does become a float mid-equation if alpha is also a float
|
||||
temp: float = 100,
|
||||
move: str = "1-1",
|
||||
max_iterations: int = 10,
|
||||
N_inner: int = 100,
|
||||
alpha: float = 0.01,
|
||||
seed: Incomplete | None = None,
|
||||
weight: str | None = "weight",
|
||||
source=None,
|
||||
temp: int | None = 100,
|
||||
move="1-1",
|
||||
max_iterations: int | None = 10,
|
||||
N_inner: int | None = 100,
|
||||
alpha=0.01,
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def threshold_accepting_tsp(
|
||||
G,
|
||||
G: Graph[_Node],
|
||||
init_cycle,
|
||||
weight: str = "weight",
|
||||
source: Incomplete | None = None,
|
||||
threshold: float = 1,
|
||||
move: str = "1-1",
|
||||
max_iterations: int = 10,
|
||||
N_inner: int = 100,
|
||||
alpha: float = 0.1,
|
||||
seed: Incomplete | None = None,
|
||||
weight: str | None = "weight",
|
||||
source=None,
|
||||
threshold: int | None = 1,
|
||||
move="1-1",
|
||||
max_iterations: int | None = 10,
|
||||
N_inner: int | None = 100,
|
||||
alpha=0.1,
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = ["treewidth_min_degree", "treewidth_min_fill_in"]
|
||||
|
||||
@_dispatchable
|
||||
def treewidth_min_degree(G): ...
|
||||
def treewidth_min_degree(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def treewidth_min_fill_in(G): ...
|
||||
def treewidth_min_fill_in(G: Graph[_Node]): ...
|
||||
|
||||
class MinDegreeHeuristic:
|
||||
count: Incomplete
|
||||
|
||||
def __init__(self, graph) -> None: ...
|
||||
def best_node(self, graph): ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def min_weighted_vertex_cover(G, weight: Incomplete | None = None): ...
|
||||
def min_weighted_vertex_cover(G: Graph[_Node], weight: str | None = None): ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def average_degree_connectivity(
|
||||
G, source: str = "in+out", target: str = "in+out", nodes: Incomplete | None = None, weight: Incomplete | None = None
|
||||
G: Graph[_Node], source="in+out", target="in+out", nodes: Iterable[Incomplete] | None = None, weight: str | None = None
|
||||
): ...
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def degree_assortativity_coefficient(
|
||||
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None
|
||||
G: Graph[_Node], x: str = "out", y: str = "in", weight: str | None = None, nodes: Iterable[Incomplete] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def degree_pearson_correlation_coefficient(
|
||||
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None
|
||||
G: Graph[_Node], x: str = "out", y: str = "in", weight: str | None = None, nodes: Iterable[Incomplete] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def attribute_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ...
|
||||
def attribute_assortativity_coefficient(G: Graph[_Node], attribute: str, nodes: Iterable[Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def numeric_assortativity_coefficient(G, attribute, nodes: Incomplete | None = None): ...
|
||||
def numeric_assortativity_coefficient(G: Graph[_Node], attribute: str, nodes: Iterable[Incomplete] | None = None): ...
|
||||
|
||||
@@ -1,26 +1,34 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def attribute_mixing_dict(G, attribute, nodes: Incomplete | None = None, normalized: bool = False): ...
|
||||
def attribute_mixing_dict(
|
||||
G: Graph[_Node], attribute: str, nodes: Iterable[Incomplete] | None = None, normalized: bool = False
|
||||
): ...
|
||||
@_dispatchable
|
||||
def attribute_mixing_matrix(
|
||||
G, attribute, nodes: Incomplete | None = None, mapping: Incomplete | None = None, normalized: bool = True
|
||||
G: Graph[_Node],
|
||||
attribute: str,
|
||||
nodes: Iterable[Incomplete] | None = None,
|
||||
mapping: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
normalized: bool = True,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def degree_mixing_dict(
|
||||
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None, normalized: bool = False
|
||||
G: Graph[_Node], x: str = "out", y: str = "in", weight: str | None = None, nodes=None, normalized: bool = False
|
||||
): ...
|
||||
@_dispatchable
|
||||
def degree_mixing_matrix(
|
||||
G,
|
||||
G: Graph[_Node],
|
||||
x: str = "out",
|
||||
y: str = "in",
|
||||
weight: Incomplete | None = None,
|
||||
nodes: Incomplete | None = None,
|
||||
weight: str | None = None,
|
||||
nodes: Iterable[Incomplete] | None = None,
|
||||
normalized: bool = True,
|
||||
mapping: Incomplete | None = None,
|
||||
mapping: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def mixing_dict(xy, normalized: bool = False): ...
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def average_neighbor_degree(
|
||||
G, source: str = "out", target: str = "out", nodes: Incomplete | None = None, weight: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
source: str | None = "out",
|
||||
target: str | None = "out",
|
||||
nodes: Iterable[Incomplete] | None = None,
|
||||
weight: str | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Generator, Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def node_attribute_xy(G, attribute, nodes: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
|
||||
def node_attribute_xy(
|
||||
G: Graph[_Node], attribute, nodes: Iterable[Incomplete] | None = None
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
@_dispatchable
|
||||
def node_degree_xy(
|
||||
G, x: str = "out", y: str = "in", weight: Incomplete | None = None, nodes: Incomplete | None = None
|
||||
G: Graph[_Node], x: str = "out", y: str = "in", weight: str | None = None, nodes: Iterable[Incomplete] | None = None
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def find_asteroidal_triple(G): ...
|
||||
def find_asteroidal_triple(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def is_at_free(G): ...
|
||||
def is_at_free(G: Graph[_Node]): ...
|
||||
|
||||
@@ -3,6 +3,7 @@ from networkx.algorithms.bipartite.centrality import *
|
||||
from networkx.algorithms.bipartite.cluster import *
|
||||
from networkx.algorithms.bipartite.covering import *
|
||||
from networkx.algorithms.bipartite.edgelist import *
|
||||
from networkx.algorithms.bipartite.extendability import *
|
||||
from networkx.algorithms.bipartite.generators import *
|
||||
from networkx.algorithms.bipartite.matching import *
|
||||
from networkx.algorithms.bipartite.matrix import *
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def color(G): ...
|
||||
def color(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def is_bipartite(G): ...
|
||||
def is_bipartite(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def is_bipartite_node_set(G, nodes): ...
|
||||
def is_bipartite_node_set(G: Graph[_Node], nodes): ...
|
||||
@_dispatchable
|
||||
def sets(G, top_nodes: Incomplete | None = None): ...
|
||||
def sets(G: Graph[_Node], top_nodes: Iterable[Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def density(B, nodes): ...
|
||||
def density(B: Graph[_Node], nodes): ...
|
||||
@_dispatchable
|
||||
def degrees(B, nodes, weight: Incomplete | None = None): ...
|
||||
def degrees(B: Graph[_Node], nodes, weight: str | None = None): ...
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def degree_centrality(G, nodes): ...
|
||||
def degree_centrality(G: Graph[_Node], nodes): ...
|
||||
@_dispatchable
|
||||
def betweenness_centrality(G, nodes): ...
|
||||
def betweenness_centrality(G: Graph[_Node], nodes): ...
|
||||
@_dispatchable
|
||||
def closeness_centrality(G, nodes, normalized: bool = True): ...
|
||||
def closeness_centrality(G: Graph[_Node], nodes, normalized: bool | None = True): ...
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def latapy_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ...
|
||||
def latapy_clustering(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None, mode: str = "dot"): ...
|
||||
|
||||
clustering = latapy_clustering
|
||||
|
||||
@_dispatchable
|
||||
def average_clustering(G, nodes: Incomplete | None = None, mode: str = "dot"): ...
|
||||
def average_clustering(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None, mode: str = "dot"): ...
|
||||
@_dispatchable
|
||||
def robins_alexander_clustering(G): ...
|
||||
def robins_alexander_clustering(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ...
|
||||
def min_edge_cover(G: Graph[_Node], matching_algorithm: Callable[..., Incomplete] | None = None): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
@@ -10,20 +11,20 @@ def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[I
|
||||
@_dispatchable
|
||||
def parse_edgelist(
|
||||
lines,
|
||||
comments: str = "#",
|
||||
delimiter: Incomplete | None = None,
|
||||
create_using: Incomplete | None = None,
|
||||
nodetype: Incomplete | None = None,
|
||||
data: bool = True,
|
||||
comments: str | None = "#",
|
||||
delimiter: str | None = None,
|
||||
create_using: Graph[_Node] | None = None,
|
||||
nodetype=None,
|
||||
data=True,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def read_edgelist(
|
||||
path,
|
||||
comments: str = "#",
|
||||
delimiter: Incomplete | None = None,
|
||||
create_using: Incomplete | None = None,
|
||||
nodetype: Incomplete | None = None,
|
||||
data: bool = True,
|
||||
edgetype: Incomplete | None = None,
|
||||
encoding: str = "utf-8",
|
||||
comments: str | None = "#",
|
||||
delimiter: str | None = None,
|
||||
create_using=None,
|
||||
nodetype=None,
|
||||
data=True,
|
||||
edgetype=None,
|
||||
encoding: str | None = "utf-8",
|
||||
): ...
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def maximal_extendability(G: Graph[_Node]): ...
|
||||
@@ -1,20 +1,34 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def complete_bipartite_graph(n1, n2, create_using: Incomplete | None = None): ...
|
||||
def complete_bipartite_graph(n1, n2, create_using: Graph[_Node] | None = None): ...
|
||||
@_dispatchable
|
||||
def configuration_model(aseq, bseq, create_using: Incomplete | None = None, seed: Incomplete | None = None): ...
|
||||
def configuration_model(
|
||||
aseq: Iterable[Incomplete],
|
||||
bseq: Iterable[Incomplete],
|
||||
create_using: Graph[_Node] | None = None,
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ...
|
||||
def havel_hakimi_graph(aseq: Iterable[Incomplete], bseq: Iterable[Incomplete], create_using: Graph[_Node] | None = None): ...
|
||||
@_dispatchable
|
||||
def reverse_havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ...
|
||||
def reverse_havel_hakimi_graph(
|
||||
aseq: Iterable[Incomplete], bseq: Iterable[Incomplete], create_using: Graph[_Node] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def alternating_havel_hakimi_graph(aseq, bseq, create_using: Incomplete | None = None): ...
|
||||
def alternating_havel_hakimi_graph(
|
||||
aseq: Iterable[Incomplete], bseq: Iterable[Incomplete], create_using: Graph[_Node] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def preferential_attachment_graph(aseq, p, create_using: Incomplete | None = None, seed: Incomplete | None = None): ...
|
||||
def preferential_attachment_graph(
|
||||
aseq: Iterable[Incomplete], p: float, create_using: Graph[_Node] | None = None, seed: int | RandomState | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def random_graph(n, m, p, seed: Incomplete | None = None, directed: bool = False): ...
|
||||
def random_graph(n: int, m: int, p: float, seed: int | RandomState | None = None, directed: bool | None = False): ...
|
||||
@_dispatchable
|
||||
def gnmk_random_graph(n, m, k, seed: Incomplete | None = None, directed: bool = False): ...
|
||||
def gnmk_random_graph(n: int, m: int, k: int, seed: int | RandomState | None = None, directed: bool | None = False): ...
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def hopcroft_karp_matching(G, top_nodes: Incomplete | None = None): ...
|
||||
def hopcroft_karp_matching(G: Graph[_Node], top_nodes: Iterable[_Node] | None = None): ...
|
||||
@_dispatchable
|
||||
def eppstein_matching(G, top_nodes: Incomplete | None = None): ...
|
||||
def eppstein_matching(G: Graph[_Node], top_nodes: Iterable[Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def to_vertex_cover(G, matching, top_nodes: Incomplete | None = None): ...
|
||||
def to_vertex_cover(
|
||||
G: Graph[_Node], matching: SupportsGetItem[Incomplete, Incomplete], top_nodes: Iterable[Incomplete] | None = None
|
||||
): ...
|
||||
|
||||
maximum_matching = hopcroft_karp_matching
|
||||
|
||||
@_dispatchable
|
||||
def minimum_weight_full_matching(G, top_nodes: Incomplete | None = None, weight: str = "weight"): ...
|
||||
def minimum_weight_full_matching(
|
||||
G: Graph[_Node], top_nodes: Iterable[Incomplete] | None = None, weight: str | None = "weight"
|
||||
): ...
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def biadjacency_matrix(
|
||||
G,
|
||||
row_order,
|
||||
column_order: Incomplete | None = None,
|
||||
dtype: Incomplete | None = None,
|
||||
weight: str = "weight",
|
||||
format: str = "csr",
|
||||
G: Graph[_Node],
|
||||
row_order: Iterable[_Node],
|
||||
column_order: Iterable[Incomplete] | None = None,
|
||||
dtype=None,
|
||||
weight: str | None = "weight",
|
||||
format="csr",
|
||||
): ...
|
||||
@_dispatchable
|
||||
def from_biadjacency_matrix(A, create_using: Incomplete | None = None, edge_attribute: str = "weight"): ...
|
||||
def from_biadjacency_matrix(A, create_using: Graph[_Node] | None = None, edge_attribute: str = "weight"): ...
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def projected_graph(B, nodes, multigraph: bool = False): ...
|
||||
def projected_graph(B: Graph[_Node], nodes: Iterable[Incomplete], multigraph: bool = False): ...
|
||||
@_dispatchable
|
||||
def weighted_projected_graph(B, nodes, ratio: bool = False): ...
|
||||
def weighted_projected_graph(B: Graph[_Node], nodes: Iterable[Incomplete], ratio: bool = False): ...
|
||||
@_dispatchable
|
||||
def collaboration_weighted_projected_graph(B, nodes): ...
|
||||
def collaboration_weighted_projected_graph(B: Graph[_Node], nodes: Iterable[Incomplete]): ...
|
||||
@_dispatchable
|
||||
def overlap_weighted_projected_graph(B, nodes, jaccard: bool = True): ...
|
||||
def overlap_weighted_projected_graph(B: Graph[_Node], nodes: Iterable[Incomplete], jaccard: bool = True): ...
|
||||
@_dispatchable
|
||||
def generic_weighted_projected_graph(B, nodes, weight_function: Incomplete | None = None): ...
|
||||
def generic_weighted_projected_graph(
|
||||
B: Graph[_Node], nodes: Iterable[Incomplete], weight_function: Callable[..., Incomplete] | None = None
|
||||
): ...
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def node_redundancy(G, nodes: Incomplete | None = None): ...
|
||||
def node_redundancy(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None): ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def spectral_bipartivity(G, nodes: Incomplete | None = None, weight: str = "weight"): ...
|
||||
def spectral_bipartivity(G: Graph[_Node], nodes=None, weight: str = "weight"): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, Iterable
|
||||
from typing import Literal, TypeVar, overload
|
||||
from typing import TypeVar, overload
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
@@ -10,106 +10,101 @@ _U = TypeVar("_U")
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None = None,
|
||||
data: Literal[False] = False,
|
||||
keys: Literal[False] = False,
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None,
|
||||
data: Literal[True],
|
||||
keys: Literal[False] = False,
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None = None,
|
||||
*,
|
||||
data: Literal[True],
|
||||
keys: Literal[False] = False,
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, dict[str, Incomplete]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None,
|
||||
data: str,
|
||||
keys: Literal[False] = False,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: _U | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, dict[str, _U]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None = None,
|
||||
*,
|
||||
data: str,
|
||||
keys: Literal[False] = False,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: _U | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, dict[str, _U]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None,
|
||||
data: Literal[False],
|
||||
keys: Literal[True],
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, int], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None = None,
|
||||
data: Literal[False] = False,
|
||||
*,
|
||||
keys: Literal[True],
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, int], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None,
|
||||
data: Literal[True],
|
||||
keys: Literal[True],
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None = None,
|
||||
*,
|
||||
data: Literal[True],
|
||||
keys: Literal[True],
|
||||
default=None,
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: Incomplete | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, int, dict[str, Incomplete]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None,
|
||||
data: str,
|
||||
keys: Literal[True],
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: _U | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, int, dict[str, _U]], None, None]: ...
|
||||
@overload
|
||||
def edge_boundary(
|
||||
G: Graph[_Node],
|
||||
nbunch1: Iterable[_Node],
|
||||
nbunch2: Iterable[_Node] | None = None,
|
||||
*,
|
||||
data: str,
|
||||
keys: Literal[True],
|
||||
nbunch1: Iterable[Incomplete],
|
||||
nbunch2: Iterable[Incomplete] | None = None,
|
||||
data=False,
|
||||
keys: bool = False,
|
||||
default: _U | None = None,
|
||||
) -> Generator[tuple[_Node, _Node, int, dict[str, _U]], None, None]: ...
|
||||
@_dispatchable
|
||||
def node_boundary(G: Graph[_Node], nbunch1: Iterable[_Node], nbunch2: Iterable[_Node] | None = None) -> set[_Node]: ...
|
||||
def node_boundary(G: Graph[_Node], nbunch1: Iterable[Incomplete], nbunch2: Iterable[Incomplete] | None = None) -> set[_Node]: ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import Literal, overload
|
||||
from collections.abc import Generator
|
||||
from typing import overload
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
@@ -8,12 +7,12 @@ from networkx.utils.backends import _dispatchable
|
||||
@_dispatchable
|
||||
def bridges(G: Graph[_Node], root: _Node | None = None) -> Generator[_Node, None, None]: ...
|
||||
@_dispatchable
|
||||
def has_bridges(G: Graph[_Node], root: Incomplete | None = None) -> bool: ...
|
||||
def has_bridges(G: Graph[_Node], root: _Node | None = None) -> bool: ...
|
||||
@overload
|
||||
def local_bridges(
|
||||
G: Graph[_Node], with_span: Literal[False], weight: str | Callable[[_Node], float] | None = None
|
||||
G: Graph[_Node], with_span: bool = True, weight: str | None = None
|
||||
) -> Generator[tuple[_Node, _Node], None, None]: ...
|
||||
@overload
|
||||
def local_bridges(
|
||||
G: Graph[_Node], with_span: Literal[True] = True, weight: str | Callable[[_Node], float] | None = None
|
||||
G: Graph[_Node], with_span: bool = True, weight: str | None = None
|
||||
) -> Generator[tuple[_Node, _Node, int], None, None]: ...
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Edge, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
@@ -8,12 +6,16 @@ from numpy.random import RandomState
|
||||
def betweenness_centrality(
|
||||
G: Graph[_Node],
|
||||
k: int | None = None,
|
||||
normalized: bool = True,
|
||||
normalized: bool | None = True,
|
||||
weight: str | None = None,
|
||||
endpoints: bool = False,
|
||||
endpoints: bool | None = False,
|
||||
seed: int | RandomState | None = None,
|
||||
) -> dict[_Node, float]: ...
|
||||
@_dispatchable
|
||||
def edge_betweenness_centrality(
|
||||
G: Graph[_Node], k: int | None = None, normalized: bool = True, weight: str | None = None, seed: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
k: int | None = None,
|
||||
normalized: bool | None = True,
|
||||
weight: str | None = None,
|
||||
seed: int | RandomState | None = None,
|
||||
) -> dict[_Edge[_Node], float]: ...
|
||||
|
||||
@@ -5,9 +5,17 @@ from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def betweenness_centrality_subset(
|
||||
G: Graph[_Node], sources: Iterable[_Node], targets: Iterable[_Node], normalized: bool = False, weight: str | None = None
|
||||
G: Graph[_Node],
|
||||
sources: Iterable[_Node],
|
||||
targets: Iterable[_Node],
|
||||
normalized: bool | None = False,
|
||||
weight: str | None = None,
|
||||
) -> dict[_Node, float]: ...
|
||||
@_dispatchable
|
||||
def edge_betweenness_centrality_subset(
|
||||
G: Graph[_Node], sources: Iterable[_Node], targets: Iterable[_Node], normalized: bool = False, weight: str | None = None
|
||||
G: Graph[_Node],
|
||||
sources: Iterable[_Node],
|
||||
targets: Iterable[_Node],
|
||||
normalized: bool | None = False,
|
||||
weight: str | None = None,
|
||||
) -> dict[_Edge[_Node], float]: ...
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
from _typeshed import SupportsKeysAndGetItem
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
|
||||
from networkx.classes.graph import Graph, _Edge, _Node
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def closeness_centrality(
|
||||
G: Graph[_Node], u: _Node | None = None, distance: str | None = None, wf_improved: bool = True
|
||||
G: Graph[_Node], u: _Node | None = None, distance=None, wf_improved: bool | None = True
|
||||
) -> dict[_Node, float]: ...
|
||||
@_dispatchable
|
||||
def incremental_closeness_centrality(
|
||||
G: Graph[_Node],
|
||||
edge: _Edge[_Node],
|
||||
prev_cc: SupportsKeysAndGetItem[_Node, float] | None = None,
|
||||
insertion: bool = True,
|
||||
wf_improved: bool = True,
|
||||
edge: tuple[Incomplete],
|
||||
prev_cc: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
insertion: bool | None = True,
|
||||
wf_improved: bool | None = True,
|
||||
) -> dict[_Node, float]: ...
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def approximate_current_flow_betweenness_centrality(
|
||||
G,
|
||||
normalized: bool = True,
|
||||
weight: Incomplete | None = None,
|
||||
dtype=...,
|
||||
G: Graph[_Node],
|
||||
normalized: bool | None = True,
|
||||
weight: str | None = None,
|
||||
dtype: type = ...,
|
||||
solver: str = "full",
|
||||
epsilon: float = 0.5,
|
||||
kmax: int = 10000,
|
||||
seed: Incomplete | None = None,
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def current_flow_betweenness_centrality(
|
||||
G, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "full"
|
||||
G: Graph[_Node], normalized: bool | None = True, weight: str | None = None, dtype: type = ..., solver: str = "full"
|
||||
): ...
|
||||
@_dispatchable
|
||||
def edge_current_flow_betweenness_centrality(
|
||||
G, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "full"
|
||||
G: Graph[_Node], normalized: bool | None = True, weight: str | None = None, dtype: type = ..., solver: str = "full"
|
||||
): ...
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def current_flow_betweenness_centrality_subset(
|
||||
G, sources, targets, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "lu"
|
||||
G: Graph[_Node],
|
||||
sources: Iterable[_Node],
|
||||
targets: Iterable[_Node],
|
||||
normalized: bool | None = True,
|
||||
weight: str | None = None,
|
||||
dtype: type = ...,
|
||||
solver: str = "lu",
|
||||
): ...
|
||||
@_dispatchable
|
||||
def edge_current_flow_betweenness_centrality_subset(
|
||||
G, sources, targets, normalized: bool = True, weight: Incomplete | None = None, dtype=..., solver: str = "lu"
|
||||
G: Graph[_Node],
|
||||
sources: Iterable[_Node],
|
||||
targets: Iterable[_Node],
|
||||
normalized: bool | None = True,
|
||||
weight: str | None = None,
|
||||
dtype: type = ...,
|
||||
solver: str = "lu",
|
||||
): ...
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def current_flow_closeness_centrality(G, weight: Incomplete | None = None, dtype=..., solver: str = "lu"): ...
|
||||
def current_flow_closeness_centrality(G: Graph[_Node], weight: str | None = None, dtype: type = ..., solver: str = "lu"): ...
|
||||
|
||||
information_centrality = current_flow_closeness_centrality
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def eigenvector_centrality(
|
||||
G, max_iter: int = 100, tol: float = 1e-06, nstart: Incomplete | None = None, weight: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
max_iter: int | None = 100,
|
||||
tol: float | None = 1e-06,
|
||||
nstart: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
weight: str | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def eigenvector_centrality_numpy(G, weight: Incomplete | None = None, max_iter: int = 50, tol: float = 0): ...
|
||||
def eigenvector_centrality_numpy(
|
||||
G: Graph[_Node], weight: str | None = None, max_iter: int | None = 50, tol: float | None = 0
|
||||
): ...
|
||||
|
||||
@@ -12,6 +12,7 @@ class InverseLaplacian:
|
||||
w: Incomplete
|
||||
C: Incomplete
|
||||
L1: Incomplete
|
||||
|
||||
def __init__(self, L, width: Incomplete | None = None, dtype: Incomplete | None = None) -> None: ...
|
||||
def init_solver(self, L) -> None: ...
|
||||
def solve(self, r) -> None: ...
|
||||
@@ -22,18 +23,21 @@ class InverseLaplacian:
|
||||
|
||||
class FullInverseLaplacian(InverseLaplacian):
|
||||
IL: Incomplete
|
||||
|
||||
def init_solver(self, L) -> None: ...
|
||||
def solve(self, rhs): ...
|
||||
def solve_inverse(self, r): ...
|
||||
|
||||
class SuperLUInverseLaplacian(InverseLaplacian):
|
||||
lusolve: Incomplete
|
||||
|
||||
def init_solver(self, L) -> None: ...
|
||||
def solve_inverse(self, r): ...
|
||||
def solve(self, rhs): ...
|
||||
|
||||
class CGInverseLaplacian(InverseLaplacian):
|
||||
M: Incomplete
|
||||
|
||||
def init_solver(self, L) -> None: ...
|
||||
def solve(self, rhs): ...
|
||||
def solve_inverse(self, r): ...
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def group_betweenness_centrality(G, C, normalized: bool = True, weight: Incomplete | None = None, endpoints: bool = False): ...
|
||||
@_dispatchable
|
||||
def prominent_group(
|
||||
G,
|
||||
k,
|
||||
weight: Incomplete | None = None,
|
||||
C: Incomplete | None = None,
|
||||
endpoints: bool = False,
|
||||
normalized: bool = True,
|
||||
greedy: bool = False,
|
||||
def group_betweenness_centrality(
|
||||
G: Graph[_Node], C, normalized: bool | None = True, weight: str | None = None, endpoints: bool | None = False
|
||||
): ...
|
||||
@_dispatchable
|
||||
def group_closeness_centrality(G, S, weight: Incomplete | None = None): ...
|
||||
def prominent_group(
|
||||
G: Graph[_Node],
|
||||
k: int,
|
||||
weight: str | None = None,
|
||||
C: Iterable[Incomplete] | None = None,
|
||||
endpoints: bool | None = False,
|
||||
normalized: bool | None = True,
|
||||
greedy: bool | None = False,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def group_degree_centrality(G, S): ...
|
||||
def group_closeness_centrality(G: Graph[_Node], S: Iterable[Incomplete], weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def group_in_degree_centrality(G, S): ...
|
||||
def group_degree_centrality(G: Graph[_Node], S: Iterable[Incomplete]): ...
|
||||
@_dispatchable
|
||||
def group_out_degree_centrality(G, S): ...
|
||||
def group_in_degree_centrality(G: Graph[_Node], S: Iterable[Incomplete]): ...
|
||||
@_dispatchable
|
||||
def group_out_degree_centrality(G: Graph[_Node], S: Iterable[Incomplete]): ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def harmonic_centrality(
|
||||
G, nbunch: Incomplete | None = None, distance: Incomplete | None = None, sources: Incomplete | None = None
|
||||
G: Graph[_Node], nbunch: Iterable[Incomplete] | None = None, distance=None, sources: Iterable[Incomplete] | None = None
|
||||
): ...
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def katz_centrality(
|
||||
G,
|
||||
alpha: float = 0.1,
|
||||
beta: float = 1.0,
|
||||
max_iter: int = 1000,
|
||||
tol: float = 1e-06,
|
||||
nstart: Incomplete | None = None,
|
||||
normalized: bool = True,
|
||||
weight: Incomplete | None = None,
|
||||
G: Graph[_Node],
|
||||
alpha: float | None = 0.1,
|
||||
beta: float | SupportsGetItem[Incomplete, Incomplete] | None = 1.0,
|
||||
max_iter: int | None = 1000,
|
||||
tol: float | None = 1e-06,
|
||||
nstart: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
normalized: bool | None = True,
|
||||
weight: str | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def katz_centrality_numpy(
|
||||
G, alpha: float = 0.1, beta: float = 1.0, normalized: bool = True, weight: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
alpha: float = 0.1,
|
||||
beta: float | SupportsGetItem[Incomplete, Incomplete] | None = 1.0,
|
||||
normalized: bool = True,
|
||||
weight: str | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def laplacian_centrality(
|
||||
G,
|
||||
G: Graph[_Node],
|
||||
normalized: bool = True,
|
||||
nodelist: Incomplete | None = None,
|
||||
weight: str = "weight",
|
||||
walk_type: Incomplete | None = None,
|
||||
nodelist: Iterable[Incomplete] | None = None,
|
||||
weight: str | None = "weight",
|
||||
walk_type: str | None = None,
|
||||
alpha: float = 0.95,
|
||||
): ...
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = ["load_centrality", "edge_load_centrality"]
|
||||
|
||||
@_dispatchable
|
||||
def newman_betweenness_centrality(
|
||||
G, v: Incomplete | None = None, cutoff: Incomplete | None = None, normalized: bool = True, weight: Incomplete | None = None
|
||||
G: Graph[_Node], v=None, cutoff: bool | None = None, normalized: bool | None = True, weight: str | None = None
|
||||
): ...
|
||||
|
||||
load_centrality = newman_betweenness_centrality
|
||||
|
||||
@_dispatchable
|
||||
def edge_load_centrality(G, cutoff: bool = False): ...
|
||||
def edge_load_centrality(G: Graph[_Node], cutoff: bool | None = False): ...
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def percolation_centrality(
|
||||
G, attribute: str = "percolation", states: Incomplete | None = None, weight: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
attribute: str | None = "percolation",
|
||||
states: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
weight: str | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def global_reaching_centrality(G, weight: Incomplete | None = None, normalized: bool = True): ...
|
||||
def global_reaching_centrality(G: DiGraph[_Node], weight: str | None = None, normalized: bool | None = True): ...
|
||||
@_dispatchable
|
||||
def local_reaching_centrality(
|
||||
G, v, paths: Incomplete | None = None, weight: Incomplete | None = None, normalized: bool = True
|
||||
G: DiGraph[_Node],
|
||||
v: _Node,
|
||||
paths: SupportsGetItem[Incomplete, Incomplete] | None = None,
|
||||
weight: str | None = None,
|
||||
normalized: bool | None = True,
|
||||
): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def second_order_centrality(G): ...
|
||||
def second_order_centrality(G: Graph[_Node], weight: str | None = "weight"): ...
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def subgraph_centrality_exp(G): ...
|
||||
def subgraph_centrality_exp(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def subgraph_centrality(G): ...
|
||||
def subgraph_centrality(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def communicability_betweenness_centrality(G): ...
|
||||
def communicability_betweenness_centrality(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def estrada_index(G): ...
|
||||
def estrada_index(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def trophic_levels(G, weight: str = "weight"): ...
|
||||
def trophic_levels(G: DiGraph[_Node], weight="weight"): ...
|
||||
@_dispatchable
|
||||
def trophic_differences(G, weight: str = "weight"): ...
|
||||
def trophic_differences(G: DiGraph[_Node], weight="weight"): ...
|
||||
@_dispatchable
|
||||
def trophic_incoherence_parameter(G, weight: str = "weight", cannibalism: bool = False): ...
|
||||
def trophic_incoherence_parameter(G: DiGraph[_Node], weight="weight", cannibalism: bool = False): ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def voterank(G, number_of_nodes: Incomplete | None = None): ...
|
||||
def voterank(G: Graph[_Node], number_of_nodes: int | None = None): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from collections.abc import Generator, Hashable
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.exception import NetworkXException
|
||||
@@ -8,10 +8,10 @@ from networkx.utils.backends import _dispatchable
|
||||
class NetworkXTreewidthBoundExceeded(NetworkXException): ...
|
||||
|
||||
@_dispatchable
|
||||
def is_chordal(G: Graph[Hashable]) -> bool: ...
|
||||
def is_chordal(G: Graph[_Node]) -> bool: ...
|
||||
@_dispatchable
|
||||
def find_induced_nodes(G: Graph[_Node], s: _Node, t: _Node, treewidth_bound: float = sys.maxsize) -> set[_Node]: ...
|
||||
@_dispatchable
|
||||
def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def chordal_graph_treewidth(G: Graph[Hashable]) -> int: ...
|
||||
def chordal_graph_treewidth(G: Graph[_Node]) -> int: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import SupportsGetItem, Unused
|
||||
from collections.abc import Generator, Iterable, Iterator, Sized
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, Iterable, Iterator
|
||||
from typing import overload
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
@@ -8,23 +8,18 @@ from networkx.utils.backends import _dispatchable
|
||||
@_dispatchable
|
||||
def enumerate_all_cliques(G: Graph[_Node]) -> Generator[list[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def find_cliques(G: Graph[_Node], nodes: SupportsGetItem[slice, _Node] | None = None) -> Generator[list[_Node], None, None]: ...
|
||||
def find_cliques(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None) -> Generator[list[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def find_cliques_recursive(G: Graph[_Node], nodes: SupportsGetItem[slice, _Node] | None = None) -> Iterator[list[_Node]]: ...
|
||||
def find_cliques_recursive(G: Graph[_Node], nodes: Iterable[Incomplete] | None = None) -> Iterator[list[_Node]]: ...
|
||||
@_dispatchable
|
||||
def make_max_clique_graph(G: Graph[_Node], create_using: type[Graph[_Node]] | None = None) -> Graph[_Node]: ...
|
||||
def make_max_clique_graph(G: Graph[_Node], create_using: Graph[_Node] | None = None) -> Graph[_Node]: ...
|
||||
@_dispatchable
|
||||
def make_clique_bipartite(
|
||||
G: Graph[_Node], fpos: Unused = None, create_using: type[Graph[_Node]] | None = None, name: Unused = None
|
||||
G: Graph[_Node], fpos: bool | None = None, create_using: Graph[_Node] | None = None, name=None
|
||||
) -> Graph[_Node]: ...
|
||||
@overload
|
||||
def node_clique_number( # type: ignore[misc] # Incompatible return types
|
||||
G: Graph[_Node],
|
||||
nodes: Iterable[_Node] | None = None,
|
||||
cliques: Iterable[Iterable[_Node]] | None = None,
|
||||
separate_nodes: Unused = False,
|
||||
def node_clique_number(
|
||||
G: Graph[_Node], nodes=None, cliques: Iterable[Incomplete] | None = None, separate_nodes=False
|
||||
) -> dict[_Node, int]: ...
|
||||
@overload
|
||||
def node_clique_number(
|
||||
G: Graph[_Node], nodes: _Node, cliques: Iterable[Sized] | None = None, separate_nodes: Unused = False
|
||||
) -> int: ...
|
||||
def node_clique_number(G: Graph[_Node], nodes=None, cliques: Iterable[Incomplete] | None = None, separate_nodes=False) -> int: ...
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def triangles(G, nodes: Incomplete | None = None): ...
|
||||
def triangles(G: Graph[_Node], nodes=None): ...
|
||||
@_dispatchable
|
||||
def average_clustering(G, nodes: Incomplete | None = None, weight: Incomplete | None = None, count_zeros: bool = True): ...
|
||||
def average_clustering(
|
||||
G: Graph[_Node], nodes: Iterable[_Node] | None = None, weight: str | None = None, count_zeros: bool = True
|
||||
): ...
|
||||
@_dispatchable
|
||||
def clustering(G, nodes: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def clustering(G: Graph[_Node], nodes=None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def transitivity(G): ...
|
||||
def transitivity(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def square_clustering(G, nodes: Incomplete | None = None): ...
|
||||
def square_clustering(G: Graph[_Node], nodes: Iterable[_Node] | None = None): ...
|
||||
@_dispatchable
|
||||
def generalized_degree(G, nodes: Incomplete | None = None): ...
|
||||
def generalized_degree(G: Graph[_Node], nodes: Iterable[_Node] | None = None): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def equitable_color(G, num_colors): ...
|
||||
def equitable_color(G: Graph[_Node], num_colors): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = [
|
||||
@@ -32,23 +33,4 @@ def strategy_connected_sequential(G, colors, traversal: str = "bfs") -> Generato
|
||||
@_dispatchable
|
||||
def strategy_saturation_largest_first(G, colors) -> Generator[Incomplete, None, Incomplete]: ...
|
||||
@_dispatchable
|
||||
def greedy_color(G, strategy: str = "largest_first", interchange: bool = False): ...
|
||||
|
||||
class _Node:
|
||||
node_id: Incomplete
|
||||
color: int
|
||||
adj_list: Incomplete
|
||||
adj_color: Incomplete
|
||||
def __init__(self, node_id, n) -> None: ...
|
||||
def assign_color(self, adj_entry, color) -> None: ...
|
||||
def clear_color(self, adj_entry, color) -> None: ...
|
||||
def iter_neighbors(self) -> Generator[Incomplete, None, None]: ...
|
||||
def iter_neighbors_color(self, color) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
class _AdjEntry:
|
||||
node_id: Incomplete
|
||||
next: Incomplete
|
||||
mate: Incomplete
|
||||
col_next: Incomplete
|
||||
col_prev: Incomplete
|
||||
def __init__(self, node_id) -> None: ...
|
||||
def greedy_color(G: Graph[_Node], strategy="largest_first", interchange: bool = False): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def communicability(G): ...
|
||||
def communicability(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def communicability_exp(G): ...
|
||||
def communicability_exp(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def asyn_fluidc(G, k, max_iter: int = 100, seed: Incomplete | None = None): ...
|
||||
def asyn_fluidc(G: Graph[_Node], k: int, max_iter: int = 100, seed: int | RandomState | None = None): ...
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Callable, Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def girvan_newman(G, most_valuable_edge: Incomplete | None = None) -> Generator[Incomplete, None, Incomplete]: ...
|
||||
def girvan_newman(
|
||||
G: Graph[_Node], most_valuable_edge: Callable[..., Incomplete] | None = None
|
||||
) -> Generator[Incomplete, None, Incomplete]: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def is_partition(G, communities): ...
|
||||
def is_partition(G: Graph[_Node], communities): ...
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
import networkx as nx
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
|
||||
__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]: ...
|
||||
def edge_betweenness_partition(G: Graph[_Node], number_of_sets: int, *, weight: str | None = None) -> list[Incomplete]: ...
|
||||
@nx._dispatchable
|
||||
def edge_current_flow_betweenness_partition(G, number_of_sets: int, *, weight: Incomplete | None = None) -> list[Incomplete]: ...
|
||||
def edge_current_flow_betweenness_partition(
|
||||
G: Graph[_Node], number_of_sets: int, *, weight: str | None = None
|
||||
) -> list[Incomplete]: ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def k_clique_communities(G, k, cliques: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
|
||||
def k_clique_communities(G: Graph[_Node], k: int, cliques=None) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def kernighan_lin_bisection(
|
||||
G, partition: Incomplete | None = None, max_iter: int = 10, weight: str = "weight", seed: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
partition: tuple[Incomplete] | None = None,
|
||||
max_iter: int = 10,
|
||||
weight: str = "weight",
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def asyn_lpa_communities(
|
||||
G, weight: Incomplete | None = None, seed: Incomplete | None = None
|
||||
G: Graph[_Node], weight: str | None = None, seed: int | RandomState | None = None
|
||||
) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
@_dispatchable
|
||||
def label_propagation_communities(G): ...
|
||||
def label_propagation_communities(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
from numpy.random import RandomState
|
||||
|
||||
@_dispatchable
|
||||
def louvain_communities(
|
||||
G, weight: str = "weight", resolution: float = 1, threshold: float = 1e-07, seed: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
weight: str | None = "weight",
|
||||
resolution: float | None = 1,
|
||||
threshold: float | None = 1e-07,
|
||||
max_level: int | None = None,
|
||||
seed: int | RandomState | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def louvain_partitions(
|
||||
G, weight: str = "weight", resolution: float = 1, threshold: float = 1e-07, seed: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
weight: str | None = "weight",
|
||||
resolution: float | None = 1,
|
||||
threshold: float | None = 1e-07,
|
||||
seed: int | RandomState | None = None,
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def lukes_partitioning(G, max_size, node_weight: Incomplete | None = None, edge_weight: Incomplete | None = None): ...
|
||||
def lukes_partitioning(G: Graph[_Node], max_size: int, node_weight=None, edge_weight=None): ...
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def greedy_modularity_communities(
|
||||
G, weight: Incomplete | None = None, resolution: float = 1, cutoff: int = 1, best_n: Incomplete | None = None
|
||||
G: Graph[_Node], weight: str | None = None, resolution: float | None = 1, cutoff: int | None = 1, best_n: int | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def naive_greedy_modularity_communities(G, resolution: float = 1, weight: Incomplete | None = None): ...
|
||||
def naive_greedy_modularity_communities(G: Graph[_Node], resolution: float = 1, weight: str | None = None): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.exception import NetworkXError
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@@ -7,6 +8,6 @@ class NotAPartition(NetworkXError):
|
||||
def __init__(self, G, collection) -> None: ...
|
||||
|
||||
@_dispatchable
|
||||
def modularity(G, communities, weight: str = "weight", resolution: float = 1): ...
|
||||
def modularity(G: Graph[_Node], communities, weight: str | None = "weight", resolution: float = 1): ...
|
||||
@_dispatchable
|
||||
def partition_quality(G, partition): ...
|
||||
def partition_quality(G: Graph[_Node], partition): ...
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def is_biconnected(G): ...
|
||||
def is_biconnected(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def biconnected_component_edges(G) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def biconnected_component_edges(G: Graph[_Node]) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
@_dispatchable
|
||||
def biconnected_components(G) -> Generator[Incomplete, None, None]: ...
|
||||
def biconnected_components(G: Graph[_Node]) -> Generator[Incomplete, None, None]: ...
|
||||
@_dispatchable
|
||||
def articulation_points(G) -> Generator[Incomplete, None, None]: ...
|
||||
def articulation_points(G: Graph[_Node]) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def connected_components(G) -> Generator[Incomplete, None, None]: ...
|
||||
def connected_components(G: Graph[_Node]) -> Generator[Incomplete, None, None]: ...
|
||||
@_dispatchable
|
||||
def number_connected_components(G): ...
|
||||
def number_connected_components(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def is_connected(G): ...
|
||||
def is_connected(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def node_connected_component(G, n): ...
|
||||
def node_connected_component(G: Graph[_Node], n: str): ...
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def is_semiconnected(G, topo_order: Incomplete | None = None): ...
|
||||
def is_semiconnected(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from collections.abc import Generator, Hashable, Iterable
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
@@ -7,10 +7,10 @@ from networkx.utils.backends import _dispatchable
|
||||
@_dispatchable
|
||||
def strongly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def kosaraju_strongly_connected_components(G: Graph[_Node], source: _Node | None = None) -> Generator[set[_Node], None, None]: ...
|
||||
def kosaraju_strongly_connected_components(G: Graph[_Node], source=None) -> Generator[set[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def number_strongly_connected_components(G: Graph[Hashable]) -> int: ...
|
||||
def number_strongly_connected_components(G: Graph[_Node]) -> int: ...
|
||||
@_dispatchable
|
||||
def is_strongly_connected(G: Graph[Hashable]) -> bool: ...
|
||||
def is_strongly_connected(G: Graph[_Node]) -> bool: ...
|
||||
@_dispatchable
|
||||
def condensation(G: DiGraph[_Node], scc: Iterable[Iterable[_Node]] | None = None) -> DiGraph[int]: ...
|
||||
def condensation(G: DiGraph[_Node], scc=None) -> DiGraph[int]: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from collections.abc import Generator, Hashable
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
@@ -6,6 +6,6 @@ from networkx.utils.backends import _dispatchable
|
||||
@_dispatchable
|
||||
def weakly_connected_components(G: Graph[_Node]) -> Generator[set[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def number_weakly_connected_components(G: Graph[Hashable]) -> int: ...
|
||||
def number_weakly_connected_components(G: Graph[_Node]) -> int: ...
|
||||
@_dispatchable
|
||||
def is_weakly_connected(G: Graph[Hashable]) -> bool: ...
|
||||
def is_weakly_connected(G: Graph[_Node]) -> bool: ...
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable
|
||||
|
||||
from networkx.algorithms.flow import edmonds_karp
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = [
|
||||
@@ -11,40 +14,43 @@ __all__ = [
|
||||
"edge_connectivity",
|
||||
"all_pairs_node_connectivity",
|
||||
]
|
||||
|
||||
default_flow_func = edmonds_karp
|
||||
|
||||
@_dispatchable
|
||||
def local_node_connectivity(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
flow_func: Incomplete | None = None,
|
||||
auxiliary: Incomplete | None = None,
|
||||
residual: Incomplete | None = None,
|
||||
cutoff: Incomplete | None = None,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
auxiliary: DiGraph[_Node] | None = None,
|
||||
residual: DiGraph[_Node] | None = None,
|
||||
cutoff: float | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ...
|
||||
def node_connectivity(
|
||||
G: Graph[_Node], s: _Node | None = None, t: _Node | None = None, flow_func: Callable[..., Incomplete] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def average_node_connectivity(G, flow_func: Incomplete | None = None): ...
|
||||
def average_node_connectivity(G: Graph[_Node], flow_func: Callable[..., Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def all_pairs_node_connectivity(G, nbunch: Incomplete | None = None, flow_func: Incomplete | None = None): ...
|
||||
def all_pairs_node_connectivity(
|
||||
G: Graph[_Node], nbunch: Iterable[Incomplete] | None = None, flow_func: Callable[..., Incomplete] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def local_edge_connectivity(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
flow_func: Incomplete | None = None,
|
||||
auxiliary: Incomplete | None = None,
|
||||
residual: Incomplete | None = None,
|
||||
cutoff: Incomplete | None = None,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
auxiliary: DiGraph[_Node] | None = None,
|
||||
residual: DiGraph[_Node] | None = None,
|
||||
cutoff: float | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def edge_connectivity(
|
||||
G,
|
||||
s: Incomplete | None = None,
|
||||
t: Incomplete | None = None,
|
||||
flow_func: Incomplete | None = None,
|
||||
cutoff: Incomplete | None = None,
|
||||
G: Graph[_Node],
|
||||
s: _Node | None = None,
|
||||
t: _Node | None = None,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
cutoff: float | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
|
||||
from networkx.algorithms.flow import edmonds_karp
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
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
|
||||
|
||||
@_dispatchable
|
||||
def minimum_st_edge_cut(
|
||||
G, s, t, flow_func: Incomplete | None = None, auxiliary: Incomplete | None = None, residual: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
auxiliary: DiGraph[_Node] | None = None,
|
||||
residual: DiGraph[_Node] | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def minimum_st_node_cut(
|
||||
G, s, t, flow_func: Incomplete | None = None, auxiliary: Incomplete | None = None, residual: Incomplete | None = None
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
auxiliary: DiGraph[_Node] | None = None,
|
||||
residual: DiGraph[_Node] | None = None,
|
||||
): ...
|
||||
@_dispatchable
|
||||
def minimum_node_cut(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ...
|
||||
def minimum_node_cut(
|
||||
G: Graph[_Node], s: _Node | None = None, t: _Node | None = None, flow_func: Callable[..., Incomplete] | None = None
|
||||
): ...
|
||||
@_dispatchable
|
||||
def minimum_edge_cut(G, s: Incomplete | None = None, t: Incomplete | None = None, flow_func: Incomplete | None = None): ...
|
||||
def minimum_edge_cut(
|
||||
G: Graph[_Node], s: _Node | None = None, t: _Node | None = None, flow_func: Callable[..., Incomplete] | None = None
|
||||
): ...
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Callable, Generator
|
||||
|
||||
from networkx.algorithms.flow import edmonds_karp
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = ["edge_disjoint_paths", "node_disjoint_paths"]
|
||||
|
||||
default_flow_func = edmonds_karp
|
||||
|
||||
@_dispatchable
|
||||
def edge_disjoint_paths(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
flow_func: Incomplete | None = None,
|
||||
cutoff: Incomplete | None = None,
|
||||
auxiliary: Incomplete | None = None,
|
||||
residual: Incomplete | None = None,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
cutoff: int | None = None,
|
||||
auxiliary: DiGraph[_Node] | None = None,
|
||||
residual: DiGraph[_Node] | None = None,
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
@_dispatchable
|
||||
def node_disjoint_paths(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
flow_func: Incomplete | None = None,
|
||||
cutoff: Incomplete | None = None,
|
||||
auxiliary: Incomplete | None = None,
|
||||
residual: Incomplete | None = None,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
flow_func: Callable[..., Incomplete] | None = None,
|
||||
cutoff: int | None = None,
|
||||
auxiliary: DiGraph[_Node] | None = None,
|
||||
residual: DiGraph[_Node] | None = None,
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
from collections.abc import Generator, Hashable
|
||||
from _typeshed import SupportsGetItem
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def is_k_edge_connected(G: Graph[Hashable], k: int): ...
|
||||
def is_k_edge_connected(G: Graph[_Node], k: int): ...
|
||||
@_dispatchable
|
||||
def is_locally_k_edge_connected(G, s, t, k): ...
|
||||
def is_locally_k_edge_connected(G: Graph[_Node], s: _Node, t: _Node, k: int): ...
|
||||
@_dispatchable
|
||||
def k_edge_augmentation(
|
||||
G: Graph[_Node],
|
||||
k: int,
|
||||
avail: tuple[_Node, _Node] | tuple[_Node, _Node, dict[str, int]] | None = None,
|
||||
avail: set[tuple[int, int]] | set[tuple[int, int, float]] | SupportsGetItem[tuple[int, int], float] | None = None,
|
||||
weight: str | None = None,
|
||||
partial: bool = False,
|
||||
) -> Generator[tuple[_Node, _Node], None, None]: ...
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def k_edge_components(G, k): ...
|
||||
def k_edge_components(G: Graph[_Node], k: int): ...
|
||||
@_dispatchable
|
||||
def k_edge_subgraphs(G, k): ...
|
||||
def k_edge_subgraphs(G: Graph[_Node], k: int): ...
|
||||
@_dispatchable
|
||||
def bridge_components(G) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def bridge_components(G: Graph[_Node]) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
|
||||
class EdgeComponentAuxGraph:
|
||||
A: Incomplete
|
||||
H: Incomplete
|
||||
|
||||
@classmethod
|
||||
def construct(cls, G): ...
|
||||
def k_edge_components(self, k) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def k_edge_subgraphs(self, k) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def k_edge_components(self, k: int) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def k_edge_subgraphs(self, k: int) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
|
||||
from networkx.algorithms.flow import edmonds_karp
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = ["k_components"]
|
||||
|
||||
default_flow_func = edmonds_karp
|
||||
|
||||
@_dispatchable
|
||||
def k_components(G, flow_func: Incomplete | None = None): ...
|
||||
def k_components(G: Graph[_Node], flow_func: Callable[..., Incomplete] | None = None): ...
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Callable, Generator
|
||||
|
||||
from networkx.algorithms.flow import edmonds_karp
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
__all__ = ["all_node_cuts"]
|
||||
|
||||
default_flow_func = edmonds_karp
|
||||
|
||||
@_dispatchable
|
||||
def all_node_cuts(G, k: Incomplete | None = None, flow_func: Incomplete | None = None) -> Generator[Incomplete, None, None]: ...
|
||||
def all_node_cuts(
|
||||
G: Graph[_Node], k: int | None = None, flow_func: Callable[..., Incomplete] | None = None
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def stoer_wagner(G, weight: str = "weight", heap=...): ...
|
||||
def stoer_wagner(G: Graph[_Node], weight: str = "weight", heap: type = ...): ...
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, SupportsGetItem
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def core_number(G): ...
|
||||
def core_number(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def k_core(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ...
|
||||
def k_core(G: Graph[_Node], k: int | None = None, core_number: SupportsGetItem[Incomplete, Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def k_shell(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ...
|
||||
def k_shell(G: Graph[_Node], k: int | None = None, core_number: SupportsGetItem[Incomplete, Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def k_crust(G, k: Incomplete | None = None, core_number: Incomplete | None = None): ...
|
||||
def k_crust(G: Graph[_Node], k: int | None = None, core_number: SupportsGetItem[Incomplete, Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def k_corona(G, k, core_number: Incomplete | None = None): ...
|
||||
def k_corona(G: Graph[_Node], k: int, core_number: SupportsGetItem[Incomplete, Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def k_truss(G, k): ...
|
||||
def k_truss(G: Graph[_Node], k: int): ...
|
||||
@_dispatchable
|
||||
def onion_layers(G): ...
|
||||
def onion_layers(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def min_edge_cover(G, matching_algorithm: Incomplete | None = None): ...
|
||||
def min_edge_cover(G: Graph[_Node], matching_algorithm: Callable[..., Incomplete] | None = None): ...
|
||||
@_dispatchable
|
||||
def is_edge_cover(G, cover): ...
|
||||
def is_edge_cover(G: Graph[_Node], cover: set[Incomplete]): ...
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def cut_size(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def cut_size(G: Graph[_Node], S: Iterable[_Node], T: Iterable[_Node] | None = None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def volume(G, S, weight: Incomplete | None = None): ...
|
||||
def volume(G: Graph[_Node], S: Iterable[_Node], weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def normalized_cut_size(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def normalized_cut_size(G: Graph[_Node], S: Iterable[_Node], T: Iterable[_Node] | None = None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def conductance(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def conductance(G: Graph[_Node], S: Iterable[_Node], T: Iterable[_Node] | None = None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def edge_expansion(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def edge_expansion(G: Graph[_Node], S: Iterable[_Node], T: Iterable[_Node] | None = None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def mixing_expansion(G, S, T: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def mixing_expansion(G: Graph[_Node], S: Iterable[_Node], T: Iterable[_Node] | None = None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def node_expansion(G, S): ...
|
||||
def node_expansion(G: Graph[_Node], S: Iterable[_Node]): ...
|
||||
@_dispatchable
|
||||
def boundary_expansion(G, S): ...
|
||||
def boundary_expansion(G: Graph[_Node], S: Iterable[_Node]): ...
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def cycle_basis(G, root: Incomplete | None = None): ...
|
||||
def cycle_basis(G: Graph[_Node], root: _Node | None = None): ...
|
||||
@_dispatchable
|
||||
def simple_cycles(G, length_bound: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def simple_cycles(G: Graph[_Node], length_bound: int | None = None) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
|
||||
class _NeighborhoodCache(dict[Incomplete, Incomplete]):
|
||||
G: Incomplete
|
||||
|
||||
def __init__(self, G) -> None: ...
|
||||
def __missing__(self, v): ...
|
||||
|
||||
@_dispatchable
|
||||
def chordless_cycles(G, length_bound: Incomplete | None = None) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def chordless_cycles(G: DiGraph[_Node], length_bound: int | None = None) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
@_dispatchable
|
||||
def recursive_simple_cycles(G): ...
|
||||
def recursive_simple_cycles(G: DiGraph[_Node]): ...
|
||||
@_dispatchable
|
||||
def find_cycle(G, source: Incomplete | None = None, orientation: Incomplete | None = None): ...
|
||||
def find_cycle(G: Graph[_Node], source=None, orientation=None): ...
|
||||
@_dispatchable
|
||||
def minimum_cycle_basis(G, weight: Incomplete | None = None): ...
|
||||
def minimum_cycle_basis(G: Graph[_Node], weight: str | None = None): ...
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
@@ -5,4 +7,4 @@ def d_separated(G, x, y, z): ...
|
||||
@_dispatchable
|
||||
def minimal_d_separator(G, u, v): ...
|
||||
@_dispatchable
|
||||
def is_minimal_d_separator(G, u, v, z): ...
|
||||
def is_minimal_d_separator(G: DiGraph[_Node], x, y, z, *, included=None, restricted=None): ...
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
from _typeshed import SupportsRichComparison
|
||||
from collections.abc import Callable, Generator, Iterable, Reversible
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Generator, Iterable
|
||||
|
||||
from networkx.classes.digraph import DiGraph
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def descendants(G: Graph[_Node], source: _Node) -> set[_Node]: ...
|
||||
def descendants(G: Graph[_Node], source) -> set[_Node]: ...
|
||||
@_dispatchable
|
||||
def ancestors(G: Graph[_Node], source: _Node) -> set[_Node]: ...
|
||||
def ancestors(G: Graph[_Node], source) -> set[_Node]: ...
|
||||
@_dispatchable
|
||||
def is_directed_acyclic_graph(G: Graph[_Node]) -> bool: ...
|
||||
@_dispatchable
|
||||
@@ -17,25 +17,28 @@ def topological_generations(G: DiGraph[_Node]) -> Generator[list[_Node], None, N
|
||||
def topological_sort(G: DiGraph[_Node]) -> Generator[_Node, None, None]: ...
|
||||
@_dispatchable
|
||||
def lexicographical_topological_sort(
|
||||
G: DiGraph[_Node], key: Callable[[_Node], SupportsRichComparison] | None = None
|
||||
G: DiGraph[_Node], key: Callable[..., Incomplete] | None = None
|
||||
) -> Generator[_Node, None, None]: ...
|
||||
@_dispatchable
|
||||
def all_topological_sorts(G: DiGraph[_Node]) -> Generator[list[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def is_aperiodic(G: DiGraph[_Node]) -> bool: ...
|
||||
@_dispatchable
|
||||
def transitive_closure(G: Graph[_Node], reflexive: bool = False) -> Graph[_Node]: ...
|
||||
def transitive_closure(G: Graph[_Node], reflexive=False) -> Graph[_Node]: ...
|
||||
@_dispatchable
|
||||
def transitive_closure_dag(G: DiGraph[_Node], reflexive: bool = False) -> DiGraph[_Node]: ...
|
||||
def transitive_closure_dag(G: DiGraph[_Node], topo_order: Iterable[Incomplete] | None = None) -> DiGraph[_Node]: ...
|
||||
@_dispatchable
|
||||
def transitive_reduction(G: DiGraph[_Node]) -> DiGraph[_Node]: ...
|
||||
@_dispatchable
|
||||
def antichains(G: DiGraph[_Node], topo_order: Reversible[_Node] | None = None) -> Generator[list[_Node], None, None]: ...
|
||||
def antichains(G: DiGraph[_Node], topo_order: Iterable[Incomplete] | None = None) -> Generator[list[_Node], None, None]: ...
|
||||
@_dispatchable
|
||||
def dag_longest_path(
|
||||
G: DiGraph[_Node], weight: str = "weight", default_weight: int = 1, topo_order: Iterable[_Node] | None = None
|
||||
G: DiGraph[_Node],
|
||||
weight: str | None = "weight",
|
||||
default_weight: int | None = 1,
|
||||
topo_order: Iterable[Incomplete] | None = None,
|
||||
) -> list[_Node]: ...
|
||||
@_dispatchable
|
||||
def dag_longest_path_length(G: DiGraph[_Node], weight: str = "weight", default_weight: int = 1) -> int: ...
|
||||
def dag_longest_path_length(G: DiGraph[_Node], weight: str | None = "weight", default_weight: int | None = 1) -> int: ...
|
||||
@_dispatchable
|
||||
def dag_to_branching(G: Graph[_Node]) -> Graph[_Node]: ...
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def eccentricity(G, v: Incomplete | None = None, sp: Incomplete | None = None, weight: Incomplete | None = None): ...
|
||||
def eccentricity(G: Graph[_Node], v: _Node | None = None, sp=None, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def diameter(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
|
||||
def diameter(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def periphery(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
|
||||
def periphery(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def radius(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
|
||||
def radius(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def center(G, e: Incomplete | None = None, usebounds: bool = False, weight: Incomplete | None = None): ...
|
||||
def center(G: Graph[_Node], e=None, usebounds=False, weight: str | None = None): ...
|
||||
@_dispatchable
|
||||
def barycenter(G, weight: Incomplete | None = None, attr: Incomplete | None = None, sp: Incomplete | None = None): ...
|
||||
def barycenter(G, weight: str | None = None, attr=None, sp=None): ...
|
||||
@_dispatchable
|
||||
def resistance_distance(G, nodeA, nodeB, weight: Incomplete | None = None, invert_weight: bool = True): ...
|
||||
def resistance_distance(G: Graph[_Node], nodeA=None, nodeB=None, weight: str | None = None, invert_weight: bool = True): ...
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def is_distance_regular(G): ...
|
||||
def is_distance_regular(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def global_parameters(b, c): ...
|
||||
@_dispatchable
|
||||
def intersection_array(G): ...
|
||||
def intersection_array(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def is_strongly_regular(G): ...
|
||||
def is_strongly_regular(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def immediate_dominators(G, start): ...
|
||||
def immediate_dominators(G: Graph[_Node], start: _Node): ...
|
||||
@_dispatchable
|
||||
def dominance_frontiers(G, start): ...
|
||||
def dominance_frontiers(G: Graph[_Node], start: _Node): ...
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def dominating_set(G, start_with: Incomplete | None = None): ...
|
||||
def dominating_set(G: Graph[_Node], start_with: _Node | None = None): ...
|
||||
@_dispatchable
|
||||
def is_dominating_set(G, nbunch): ...
|
||||
def is_dominating_set(G: Graph[_Node], nbunch: Iterable[Incomplete]): ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from networkx.classes.graph import _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def efficiency(G, u, v): ...
|
||||
def efficiency(G, u: _Node, v: _Node): ...
|
||||
@_dispatchable
|
||||
def global_efficiency(G): ...
|
||||
@_dispatchable
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def is_eulerian(G): ...
|
||||
def is_eulerian(G: Graph[_Node]): ...
|
||||
@_dispatchable
|
||||
def is_semieulerian(G): ...
|
||||
@_dispatchable
|
||||
def eulerian_circuit(G, source: Incomplete | None = None, keys: bool = False) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def eulerian_circuit(
|
||||
G: Graph[_Node], source: _Node | None = None, keys: bool = False
|
||||
) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
@_dispatchable
|
||||
def has_eulerian_path(G, source: Incomplete | None = None): ...
|
||||
def has_eulerian_path(G: Graph[_Node], source: _Node | None = None): ...
|
||||
@_dispatchable
|
||||
def eulerian_path(G, source: Incomplete | None = None, keys: bool = False) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
def eulerian_path(G: Graph[_Node], source=None, keys: bool = False) -> Generator[Incomplete, Incomplete, None]: ...
|
||||
@_dispatchable
|
||||
def eulerize(G): ...
|
||||
def eulerize(G: Graph[_Node]): ...
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def boykov_kolmogorov(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
capacity: str = "capacity",
|
||||
residual: Incomplete | None = None,
|
||||
residual: Graph[_Node] | None = None,
|
||||
value_only: bool = False,
|
||||
cutoff: Incomplete | None = None,
|
||||
cutoff: float | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def capacity_scaling(G, demand: str = "demand", capacity: str = "capacity", weight: str = "weight", heap=...): ...
|
||||
def capacity_scaling(
|
||||
G: Graph[_Node], demand: str = "demand", capacity: str = "capacity", weight: str = "weight", heap: type = ...
|
||||
): ...
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def dinitz(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
capacity: str = "capacity",
|
||||
residual: Incomplete | None = None,
|
||||
residual: Graph[_Node] | None = None,
|
||||
value_only: bool = False,
|
||||
cutoff: Incomplete | None = None,
|
||||
cutoff: float | None = None,
|
||||
): ...
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from networkx.classes.graph import Graph, _Node
|
||||
from networkx.utils.backends import _dispatchable
|
||||
|
||||
@_dispatchable
|
||||
def edmonds_karp(
|
||||
G,
|
||||
s,
|
||||
t,
|
||||
G: Graph[_Node],
|
||||
s: _Node,
|
||||
t: _Node,
|
||||
capacity: str = "capacity",
|
||||
residual: Incomplete | None = None,
|
||||
residual: Graph[_Node] | None = None,
|
||||
value_only: bool = False,
|
||||
cutoff: Incomplete | None = None,
|
||||
cutoff: float | None = None,
|
||||
): ...
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user