-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
276 changed files
with
4,817 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
version = "3.1" | ||
upstream_repository = "https://github.com/networkx/networkx" | ||
requires = ["pandas-stubs", "numpy"] | ||
partial_stub = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from networkx import ( | ||
algorithms as algorithms, | ||
classes as classes, | ||
convert as convert, | ||
convert_matrix as convert_matrix, | ||
drawing as drawing, | ||
generators as generators, | ||
linalg as linalg, | ||
readwrite as readwrite, | ||
relabel as relabel, | ||
utils as utils, | ||
) | ||
from networkx.algorithms import * | ||
from networkx.classes import * | ||
from networkx.classes import filters as filters | ||
from networkx.convert import * | ||
from networkx.convert_matrix import * | ||
from networkx.drawing import * | ||
from networkx.exception import * | ||
from networkx.generators import * | ||
from networkx.linalg import * | ||
from networkx.readwrite import * | ||
from networkx.relabel import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
from networkx.algorithms import ( | ||
approximation as approximation, | ||
assortativity as assortativity, | ||
bipartite as bipartite, | ||
centrality as centrality, | ||
chordal as chordal, | ||
clique as clique, | ||
cluster as cluster, | ||
coloring as coloring, | ||
community as community, | ||
components as components, | ||
connectivity as connectivity, | ||
flow as flow, | ||
isomorphism as isomorphism, | ||
link_analysis as link_analysis, | ||
lowest_common_ancestors as lowest_common_ancestors, | ||
node_classification as node_classification, | ||
operators as operators, | ||
shortest_paths as shortest_paths, | ||
tournament as tournament, | ||
traversal as traversal, | ||
tree as tree, | ||
) | ||
from networkx.algorithms.assortativity import * | ||
from networkx.algorithms.asteroidal import * | ||
from networkx.algorithms.bipartite import ( | ||
complete_bipartite_graph as complete_bipartite_graph, | ||
is_bipartite as is_bipartite, | ||
projected_graph as projected_graph, | ||
) | ||
from networkx.algorithms.boundary import * | ||
from networkx.algorithms.bridges import * | ||
from networkx.algorithms.centrality import * | ||
from networkx.algorithms.chains import * | ||
from networkx.algorithms.chordal import * | ||
from networkx.algorithms.clique import * | ||
from networkx.algorithms.cluster import * | ||
from networkx.algorithms.coloring import * | ||
from networkx.algorithms.communicability_alg import * | ||
from networkx.algorithms.components import * | ||
from networkx.algorithms.connectivity import ( | ||
all_node_cuts as all_node_cuts, | ||
all_pairs_node_connectivity as all_pairs_node_connectivity, | ||
average_node_connectivity as average_node_connectivity, | ||
edge_connectivity as edge_connectivity, | ||
edge_disjoint_paths as edge_disjoint_paths, | ||
is_k_edge_connected as is_k_edge_connected, | ||
k_components as k_components, | ||
k_edge_augmentation as k_edge_augmentation, | ||
k_edge_components as k_edge_components, | ||
k_edge_subgraphs as k_edge_subgraphs, | ||
minimum_edge_cut as minimum_edge_cut, | ||
minimum_node_cut as minimum_node_cut, | ||
node_connectivity as node_connectivity, | ||
node_disjoint_paths as node_disjoint_paths, | ||
stoer_wagner as stoer_wagner, | ||
) | ||
from networkx.algorithms.core import * | ||
from networkx.algorithms.covering import * | ||
from networkx.algorithms.cuts import * | ||
from networkx.algorithms.cycles import * | ||
from networkx.algorithms.d_separation import * | ||
from networkx.algorithms.dag import * | ||
from networkx.algorithms.distance_measures import * | ||
from networkx.algorithms.distance_regular import * | ||
from networkx.algorithms.dominance import * | ||
from networkx.algorithms.dominating import * | ||
from networkx.algorithms.efficiency_measures import * | ||
from networkx.algorithms.euler import * | ||
from networkx.algorithms.flow import ( | ||
capacity_scaling as capacity_scaling, | ||
cost_of_flow as cost_of_flow, | ||
gomory_hu_tree as gomory_hu_tree, | ||
max_flow_min_cost as max_flow_min_cost, | ||
maximum_flow as maximum_flow, | ||
maximum_flow_value as maximum_flow_value, | ||
min_cost_flow as min_cost_flow, | ||
min_cost_flow_cost as min_cost_flow_cost, | ||
minimum_cut as minimum_cut, | ||
minimum_cut_value as minimum_cut_value, | ||
network_simplex as network_simplex, | ||
) | ||
from networkx.algorithms.graph_hashing import * | ||
from networkx.algorithms.graphical import * | ||
from networkx.algorithms.hierarchy import * | ||
from networkx.algorithms.hybrid import * | ||
from networkx.algorithms.isolate import * | ||
from networkx.algorithms.isomorphism import ( | ||
could_be_isomorphic as could_be_isomorphic, | ||
fast_could_be_isomorphic as fast_could_be_isomorphic, | ||
faster_could_be_isomorphic as faster_could_be_isomorphic, | ||
is_isomorphic as is_isomorphic, | ||
) | ||
from networkx.algorithms.isomorphism.vf2pp import * | ||
from networkx.algorithms.link_analysis import * | ||
from networkx.algorithms.link_prediction import * | ||
from networkx.algorithms.lowest_common_ancestors import * | ||
from networkx.algorithms.matching import * | ||
from networkx.algorithms.minors import * | ||
from networkx.algorithms.mis import * | ||
from networkx.algorithms.moral import * | ||
from networkx.algorithms.non_randomness import * | ||
from networkx.algorithms.operators import * | ||
from networkx.algorithms.planar_drawing import * | ||
from networkx.algorithms.planarity import * | ||
from networkx.algorithms.polynomials import * | ||
from networkx.algorithms.reciprocity import * | ||
from networkx.algorithms.regular import * | ||
from networkx.algorithms.richclub import * | ||
from networkx.algorithms.shortest_paths import * | ||
from networkx.algorithms.similarity import * | ||
from networkx.algorithms.simple_paths import * | ||
from networkx.algorithms.smallworld import * | ||
from networkx.algorithms.smetric import * | ||
from networkx.algorithms.sparsifiers import * | ||
from networkx.algorithms.structuralholes import * | ||
from networkx.algorithms.summarization import * | ||
from networkx.algorithms.swap import * | ||
from networkx.algorithms.traversal import * | ||
from networkx.algorithms.tree.branchings import ( | ||
ArborescenceIterator as ArborescenceIterator, | ||
maximum_branching as maximum_branching, | ||
maximum_spanning_arborescence as maximum_spanning_arborescence, | ||
minimum_branching as minimum_branching, | ||
minimum_spanning_arborescence as minimum_spanning_arborescence, | ||
) | ||
from networkx.algorithms.tree.coding import * | ||
from networkx.algorithms.tree.decomposition import * | ||
from networkx.algorithms.tree.mst import * | ||
from networkx.algorithms.tree.operations import * | ||
from networkx.algorithms.tree.recognition import * | ||
from networkx.algorithms.triads import * | ||
from networkx.algorithms.vitality import * | ||
from networkx.algorithms.voronoi import * | ||
from networkx.algorithms.wiener import * |
13 changes: 13 additions & 0 deletions
13
stubs/networkx/networkx/algorithms/approximation/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from networkx.algorithms.approximation.clique import * | ||
from networkx.algorithms.approximation.clustering_coefficient import * | ||
from networkx.algorithms.approximation.connectivity import * | ||
from networkx.algorithms.approximation.distance_measures import * | ||
from networkx.algorithms.approximation.dominating_set import * | ||
from networkx.algorithms.approximation.kcomponents import * | ||
from networkx.algorithms.approximation.matching import * | ||
from networkx.algorithms.approximation.maxcut import * | ||
from networkx.algorithms.approximation.ramsey import * | ||
from networkx.algorithms.approximation.steinertree import * | ||
from networkx.algorithms.approximation.traveling_salesman import * | ||
from networkx.algorithms.approximation.treewidth import * | ||
from networkx.algorithms.approximation.vertex_cover import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
def maximum_independent_set(G): ... | ||
def max_clique(G): ... | ||
def clique_removal(G): ... | ||
def large_clique_size(G): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from _typeshed import Incomplete | ||
|
||
def average_clustering(G, trials: int = 1000, seed: Incomplete | None = None): ... |
7 changes: 7 additions & 0 deletions
7
stubs/networkx/networkx/algorithms/approximation/connectivity.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from _typeshed import Incomplete | ||
|
||
def local_node_connectivity(G, source, target, cutoff: Incomplete | None = None): ... | ||
def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None): ... | ||
def all_pairs_node_connectivity( | ||
G, nbunch: Incomplete | None = None, cutoff: Incomplete | None = None | ||
): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from _typeshed import Incomplete | ||
|
||
def diameter(G, seed: Incomplete | None = None): ... |
4 changes: 4 additions & 0 deletions
4
stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from _typeshed import Incomplete | ||
|
||
def min_weighted_dominating_set(G, weight: Incomplete | None = None): ... | ||
def min_edge_dominating_set(G): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from _typeshed import Incomplete | ||
|
||
def k_components(G: Incomplete, min_density: float = ...) -> Incomplete: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def min_maximal_matching(G): ... |
11 changes: 11 additions & 0 deletions
11
stubs/networkx/networkx/algorithms/approximation/maxcut.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from _typeshed import Incomplete | ||
|
||
def randomized_partitioning( | ||
G, seed: Incomplete | None = None, p: float = 0.5, weight: Incomplete | None = None | ||
): ... | ||
def one_exchange( | ||
G, | ||
initial_cut: Incomplete | None = None, | ||
seed: Incomplete | None = None, | ||
weight: Incomplete | None = None, | ||
): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def ramsey_R2(G): ... |
6 changes: 6 additions & 0 deletions
6
stubs/networkx/networkx/algorithms/approximation/steinertree.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from _typeshed import Incomplete | ||
|
||
def metric_closure(G, weight: str = "weight"): ... | ||
def steiner_tree( | ||
G, terminal_nodes, weight: str = "weight", method: Incomplete | None = None | ||
): ... |
41 changes: 41 additions & 0 deletions
41
stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from _typeshed import Incomplete | ||
|
||
def christofides(G, weight: str = "weight", tree: Incomplete | None = None): ... | ||
def traveling_salesman_problem( | ||
G, | ||
weight: str = "weight", | ||
nodes: Incomplete | None = None, | ||
cycle: bool = True, | ||
method: Incomplete | None = None, | ||
): ... | ||
def asadpour_atsp( | ||
G, | ||
weight: str = "weight", | ||
seed: Incomplete | None = None, | ||
source: Incomplete | None = None, | ||
): ... | ||
def greedy_tsp(G, weight: str = "weight", source: Incomplete | None = None): ... | ||
def simulated_annealing_tsp( | ||
G, | ||
init_cycle, | ||
weight: str = "weight", | ||
source: Incomplete | None = None, | ||
temp: int = 100, | ||
move: str = "1-1", | ||
max_iterations: int = 10, | ||
N_inner: int = 100, | ||
alpha: float = 0.01, | ||
seed: Incomplete | None = None, | ||
): ... | ||
def threshold_accepting_tsp( | ||
G, | ||
init_cycle, | ||
weight: str = "weight", | ||
source: Incomplete | None = None, | ||
threshold: int = 1, | ||
move: str = "1-1", | ||
max_iterations: int = 10, | ||
N_inner: int = 100, | ||
alpha: float = 0.1, | ||
seed: Incomplete | None = None, | ||
): ... |
9 changes: 9 additions & 0 deletions
9
stubs/networkx/networkx/algorithms/approximation/treewidth.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from _typeshed import Incomplete | ||
|
||
def treewidth_min_degree(G): ... | ||
def treewidth_min_fill_in(G): ... | ||
|
||
class MinDegreeHeuristic: | ||
count: Incomplete | ||
def __init__(self, graph) -> None: ... | ||
def best_node(self, graph): ... |
3 changes: 3 additions & 0 deletions
3
stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from _typeshed import Incomplete | ||
|
||
def min_weighted_vertex_cover(G, weight: Incomplete | None = None): ... |
5 changes: 5 additions & 0 deletions
5
stubs/networkx/networkx/algorithms/assortativity/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from networkx.algorithms.assortativity.connectivity import * | ||
from networkx.algorithms.assortativity.correlation import * | ||
from networkx.algorithms.assortativity.mixing import * | ||
from networkx.algorithms.assortativity.neighbor_degree import * | ||
from networkx.algorithms.assortativity.pairs import * |
9 changes: 9 additions & 0 deletions
9
stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from _typeshed import Incomplete | ||
|
||
def average_degree_connectivity( | ||
G, | ||
source: str = "in+out", | ||
target: str = "in+out", | ||
nodes: Incomplete | None = None, | ||
weight: Incomplete | None = None, | ||
): ... |
22 changes: 22 additions & 0 deletions
22
stubs/networkx/networkx/algorithms/assortativity/correlation.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from _typeshed import Incomplete | ||
|
||
def degree_assortativity_coefficient( | ||
G, | ||
x: str = "out", | ||
y: str = "in", | ||
weight: Incomplete | None = None, | ||
nodes: Incomplete | None = None, | ||
): ... | ||
def degree_pearson_correlation_coefficient( | ||
G, | ||
x: str = "out", | ||
y: str = "in", | ||
weight: Incomplete | None = None, | ||
nodes: Incomplete | None = None, | ||
): ... | ||
def attribute_assortativity_coefficient( | ||
G, attribute, nodes: Incomplete | None = None | ||
): ... | ||
def numeric_assortativity_coefficient( | ||
G, attribute, nodes: Incomplete | None = None | ||
): ... |
30 changes: 30 additions & 0 deletions
30
stubs/networkx/networkx/algorithms/assortativity/mixing.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from _typeshed import Incomplete | ||
|
||
def attribute_mixing_dict( | ||
G, attribute, nodes: Incomplete | None = None, normalized: bool = False | ||
): ... | ||
def attribute_mixing_matrix( | ||
G, | ||
attribute, | ||
nodes: Incomplete | None = None, | ||
mapping: Incomplete | None = None, | ||
normalized: bool = True, | ||
): ... | ||
def degree_mixing_dict( | ||
G, | ||
x: str = "out", | ||
y: str = "in", | ||
weight: Incomplete | None = None, | ||
nodes: Incomplete | None = None, | ||
normalized: bool = False, | ||
): ... | ||
def degree_mixing_matrix( | ||
G, | ||
x: str = "out", | ||
y: str = "in", | ||
weight: Incomplete | None = None, | ||
nodes: Incomplete | None = None, | ||
normalized: bool = True, | ||
mapping: Incomplete | None = None, | ||
): ... | ||
def mixing_dict(xy, normalized: bool = False): ... |
9 changes: 9 additions & 0 deletions
9
stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from _typeshed import Incomplete | ||
|
||
def average_neighbor_degree( | ||
G, | ||
source: str = "out", | ||
target: str = "out", | ||
nodes: Incomplete | None = None, | ||
weight: Incomplete | None = None, | ||
): ... |
13 changes: 13 additions & 0 deletions
13
stubs/networkx/networkx/algorithms/assortativity/pairs.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from _typeshed import Incomplete | ||
from collections.abc import Generator | ||
|
||
def node_attribute_xy( | ||
G, attribute, nodes: Incomplete | None = None | ||
) -> Generator[Incomplete, None, None]: ... | ||
def node_degree_xy( | ||
G, | ||
x: str = "out", | ||
y: str = "in", | ||
weight: Incomplete | None = None, | ||
nodes: Incomplete | None = None, | ||
) -> Generator[Incomplete, None, None]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def find_asteroidal_triple(G): ... | ||
def is_at_free(G): ... |
Oops, something went wrong.