Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit afa3c9c

Browse files
committed
Add networkx
1 parent f28cb8b commit afa3c9c

File tree

276 files changed

+4817
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+4817
-0
lines changed

pyrightconfig.stricter.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"stubs/mysqlclient",
5050
"stubs/oauthlib",
5151
"stubs/openpyxl",
52+
"stubs/networkx",
5253
"stubs/passlib",
5354
"stubs/peewee",
5455
"stubs/pexpect",

stubs/networkx/METADATA.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version = "3.1"
2+
upstream_repository = "https://github.com/networkx/networkx"
3+
requires = ["pandas-stubs", "numpy"]
4+
partial_stub = true

stubs/networkx/networkx/__init__.pyi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from networkx import (
2+
algorithms as algorithms,
3+
classes as classes,
4+
convert as convert,
5+
convert_matrix as convert_matrix,
6+
drawing as drawing,
7+
generators as generators,
8+
linalg as linalg,
9+
readwrite as readwrite,
10+
relabel as relabel,
11+
utils as utils,
12+
)
13+
from networkx.algorithms import *
14+
from networkx.classes import *
15+
from networkx.classes import filters as filters
16+
from networkx.convert import *
17+
from networkx.convert_matrix import *
18+
from networkx.drawing import *
19+
from networkx.exception import *
20+
from networkx.generators import *
21+
from networkx.linalg import *
22+
from networkx.readwrite import *
23+
from networkx.relabel import *
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
from networkx.algorithms import (
2+
approximation as approximation,
3+
assortativity as assortativity,
4+
bipartite as bipartite,
5+
centrality as centrality,
6+
chordal as chordal,
7+
clique as clique,
8+
cluster as cluster,
9+
coloring as coloring,
10+
community as community,
11+
components as components,
12+
connectivity as connectivity,
13+
flow as flow,
14+
isomorphism as isomorphism,
15+
link_analysis as link_analysis,
16+
lowest_common_ancestors as lowest_common_ancestors,
17+
node_classification as node_classification,
18+
operators as operators,
19+
shortest_paths as shortest_paths,
20+
tournament as tournament,
21+
traversal as traversal,
22+
tree as tree,
23+
)
24+
from networkx.algorithms.assortativity import *
25+
from networkx.algorithms.asteroidal import *
26+
from networkx.algorithms.bipartite import (
27+
complete_bipartite_graph as complete_bipartite_graph,
28+
is_bipartite as is_bipartite,
29+
projected_graph as projected_graph,
30+
)
31+
from networkx.algorithms.boundary import *
32+
from networkx.algorithms.bridges import *
33+
from networkx.algorithms.centrality import *
34+
from networkx.algorithms.chains import *
35+
from networkx.algorithms.chordal import *
36+
from networkx.algorithms.clique import *
37+
from networkx.algorithms.cluster import *
38+
from networkx.algorithms.coloring import *
39+
from networkx.algorithms.communicability_alg import *
40+
from networkx.algorithms.components import *
41+
from networkx.algorithms.connectivity import (
42+
all_node_cuts as all_node_cuts,
43+
all_pairs_node_connectivity as all_pairs_node_connectivity,
44+
average_node_connectivity as average_node_connectivity,
45+
edge_connectivity as edge_connectivity,
46+
edge_disjoint_paths as edge_disjoint_paths,
47+
is_k_edge_connected as is_k_edge_connected,
48+
k_components as k_components,
49+
k_edge_augmentation as k_edge_augmentation,
50+
k_edge_components as k_edge_components,
51+
k_edge_subgraphs as k_edge_subgraphs,
52+
minimum_edge_cut as minimum_edge_cut,
53+
minimum_node_cut as minimum_node_cut,
54+
node_connectivity as node_connectivity,
55+
node_disjoint_paths as node_disjoint_paths,
56+
stoer_wagner as stoer_wagner,
57+
)
58+
from networkx.algorithms.core import *
59+
from networkx.algorithms.covering import *
60+
from networkx.algorithms.cuts import *
61+
from networkx.algorithms.cycles import *
62+
from networkx.algorithms.d_separation import *
63+
from networkx.algorithms.dag import *
64+
from networkx.algorithms.distance_measures import *
65+
from networkx.algorithms.distance_regular import *
66+
from networkx.algorithms.dominance import *
67+
from networkx.algorithms.dominating import *
68+
from networkx.algorithms.efficiency_measures import *
69+
from networkx.algorithms.euler import *
70+
from networkx.algorithms.flow import (
71+
capacity_scaling as capacity_scaling,
72+
cost_of_flow as cost_of_flow,
73+
gomory_hu_tree as gomory_hu_tree,
74+
max_flow_min_cost as max_flow_min_cost,
75+
maximum_flow as maximum_flow,
76+
maximum_flow_value as maximum_flow_value,
77+
min_cost_flow as min_cost_flow,
78+
min_cost_flow_cost as min_cost_flow_cost,
79+
minimum_cut as minimum_cut,
80+
minimum_cut_value as minimum_cut_value,
81+
network_simplex as network_simplex,
82+
)
83+
from networkx.algorithms.graph_hashing import *
84+
from networkx.algorithms.graphical import *
85+
from networkx.algorithms.hierarchy import *
86+
from networkx.algorithms.hybrid import *
87+
from networkx.algorithms.isolate import *
88+
from networkx.algorithms.isomorphism import (
89+
could_be_isomorphic as could_be_isomorphic,
90+
fast_could_be_isomorphic as fast_could_be_isomorphic,
91+
faster_could_be_isomorphic as faster_could_be_isomorphic,
92+
is_isomorphic as is_isomorphic,
93+
)
94+
from networkx.algorithms.isomorphism.vf2pp import *
95+
from networkx.algorithms.link_analysis import *
96+
from networkx.algorithms.link_prediction import *
97+
from networkx.algorithms.lowest_common_ancestors import *
98+
from networkx.algorithms.matching import *
99+
from networkx.algorithms.minors import *
100+
from networkx.algorithms.mis import *
101+
from networkx.algorithms.moral import *
102+
from networkx.algorithms.non_randomness import *
103+
from networkx.algorithms.operators import *
104+
from networkx.algorithms.planar_drawing import *
105+
from networkx.algorithms.planarity import *
106+
from networkx.algorithms.polynomials import *
107+
from networkx.algorithms.reciprocity import *
108+
from networkx.algorithms.regular import *
109+
from networkx.algorithms.richclub import *
110+
from networkx.algorithms.shortest_paths import *
111+
from networkx.algorithms.similarity import *
112+
from networkx.algorithms.simple_paths import *
113+
from networkx.algorithms.smallworld import *
114+
from networkx.algorithms.smetric import *
115+
from networkx.algorithms.sparsifiers import *
116+
from networkx.algorithms.structuralholes import *
117+
from networkx.algorithms.summarization import *
118+
from networkx.algorithms.swap import *
119+
from networkx.algorithms.traversal import *
120+
from networkx.algorithms.tree.branchings import (
121+
ArborescenceIterator as ArborescenceIterator,
122+
maximum_branching as maximum_branching,
123+
maximum_spanning_arborescence as maximum_spanning_arborescence,
124+
minimum_branching as minimum_branching,
125+
minimum_spanning_arborescence as minimum_spanning_arborescence,
126+
)
127+
from networkx.algorithms.tree.coding import *
128+
from networkx.algorithms.tree.decomposition import *
129+
from networkx.algorithms.tree.mst import *
130+
from networkx.algorithms.tree.operations import *
131+
from networkx.algorithms.tree.recognition import *
132+
from networkx.algorithms.triads import *
133+
from networkx.algorithms.vitality import *
134+
from networkx.algorithms.voronoi import *
135+
from networkx.algorithms.wiener import *
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from networkx.algorithms.approximation.clique import *
2+
from networkx.algorithms.approximation.clustering_coefficient import *
3+
from networkx.algorithms.approximation.connectivity import *
4+
from networkx.algorithms.approximation.distance_measures import *
5+
from networkx.algorithms.approximation.dominating_set import *
6+
from networkx.algorithms.approximation.kcomponents import *
7+
from networkx.algorithms.approximation.matching import *
8+
from networkx.algorithms.approximation.maxcut import *
9+
from networkx.algorithms.approximation.ramsey import *
10+
from networkx.algorithms.approximation.steinertree import *
11+
from networkx.algorithms.approximation.traveling_salesman import *
12+
from networkx.algorithms.approximation.treewidth import *
13+
from networkx.algorithms.approximation.vertex_cover import *
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def maximum_independent_set(G): ...
2+
def max_clique(G): ...
3+
def clique_removal(G): ...
4+
def large_clique_size(G): ...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from _typeshed import Incomplete
2+
3+
def average_clustering(G, trials: int = 1000, seed: Incomplete | None = None): ...
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from _typeshed import Incomplete
2+
3+
def local_node_connectivity(G, source, target, cutoff: Incomplete | None = None): ...
4+
def node_connectivity(G, s: Incomplete | None = None, t: Incomplete | None = None): ...
5+
def all_pairs_node_connectivity(
6+
G, nbunch: Incomplete | None = None, cutoff: Incomplete | None = None
7+
): ...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from _typeshed import Incomplete
2+
3+
def diameter(G, seed: Incomplete | None = None): ...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from _typeshed import Incomplete
2+
3+
def min_weighted_dominating_set(G, weight: Incomplete | None = None): ...
4+
def min_edge_dominating_set(G): ...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from _typeshed import Incomplete
2+
3+
def k_components(G: Incomplete, min_density: float = ...) -> Incomplete: ...
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
def min_maximal_matching(G): ...
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from _typeshed import Incomplete
2+
3+
def randomized_partitioning(
4+
G, seed: Incomplete | None = None, p: float = 0.5, weight: Incomplete | None = None
5+
): ...
6+
def one_exchange(
7+
G,
8+
initial_cut: Incomplete | None = None,
9+
seed: Incomplete | None = None,
10+
weight: Incomplete | None = None,
11+
): ...
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
def ramsey_R2(G): ...
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from _typeshed import Incomplete
2+
3+
def metric_closure(G, weight: str = "weight"): ...
4+
def steiner_tree(
5+
G, terminal_nodes, weight: str = "weight", method: Incomplete | None = None
6+
): ...
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
from _typeshed import Incomplete
2+
3+
def christofides(G, weight: str = "weight", tree: Incomplete | None = None): ...
4+
def traveling_salesman_problem(
5+
G,
6+
weight: str = "weight",
7+
nodes: Incomplete | None = None,
8+
cycle: bool = True,
9+
method: Incomplete | None = None,
10+
): ...
11+
def asadpour_atsp(
12+
G,
13+
weight: str = "weight",
14+
seed: Incomplete | None = None,
15+
source: Incomplete | None = None,
16+
): ...
17+
def greedy_tsp(G, weight: str = "weight", source: Incomplete | None = None): ...
18+
def simulated_annealing_tsp(
19+
G,
20+
init_cycle,
21+
weight: str = "weight",
22+
source: Incomplete | None = None,
23+
temp: int = 100,
24+
move: str = "1-1",
25+
max_iterations: int = 10,
26+
N_inner: int = 100,
27+
alpha: float = 0.01,
28+
seed: Incomplete | None = None,
29+
): ...
30+
def threshold_accepting_tsp(
31+
G,
32+
init_cycle,
33+
weight: str = "weight",
34+
source: Incomplete | None = None,
35+
threshold: int = 1,
36+
move: str = "1-1",
37+
max_iterations: int = 10,
38+
N_inner: int = 100,
39+
alpha: float = 0.1,
40+
seed: Incomplete | None = None,
41+
): ...
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from _typeshed import Incomplete
2+
3+
def treewidth_min_degree(G): ...
4+
def treewidth_min_fill_in(G): ...
5+
6+
class MinDegreeHeuristic:
7+
count: Incomplete
8+
def __init__(self, graph) -> None: ...
9+
def best_node(self, graph): ...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from _typeshed import Incomplete
2+
3+
def min_weighted_vertex_cover(G, weight: Incomplete | None = None): ...
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from networkx.algorithms.assortativity.connectivity import *
2+
from networkx.algorithms.assortativity.correlation import *
3+
from networkx.algorithms.assortativity.mixing import *
4+
from networkx.algorithms.assortativity.neighbor_degree import *
5+
from networkx.algorithms.assortativity.pairs import *
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from _typeshed import Incomplete
2+
3+
def average_degree_connectivity(
4+
G,
5+
source: str = "in+out",
6+
target: str = "in+out",
7+
nodes: Incomplete | None = None,
8+
weight: Incomplete | None = None,
9+
): ...
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from _typeshed import Incomplete
2+
3+
def degree_assortativity_coefficient(
4+
G,
5+
x: str = "out",
6+
y: str = "in",
7+
weight: Incomplete | None = None,
8+
nodes: Incomplete | None = None,
9+
): ...
10+
def degree_pearson_correlation_coefficient(
11+
G,
12+
x: str = "out",
13+
y: str = "in",
14+
weight: Incomplete | None = None,
15+
nodes: Incomplete | None = None,
16+
): ...
17+
def attribute_assortativity_coefficient(
18+
G, attribute, nodes: Incomplete | None = None
19+
): ...
20+
def numeric_assortativity_coefficient(
21+
G, attribute, nodes: Incomplete | None = None
22+
): ...
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from _typeshed import Incomplete
2+
3+
def attribute_mixing_dict(
4+
G, attribute, nodes: Incomplete | None = None, normalized: bool = False
5+
): ...
6+
def attribute_mixing_matrix(
7+
G,
8+
attribute,
9+
nodes: Incomplete | None = None,
10+
mapping: Incomplete | None = None,
11+
normalized: bool = True,
12+
): ...
13+
def degree_mixing_dict(
14+
G,
15+
x: str = "out",
16+
y: str = "in",
17+
weight: Incomplete | None = None,
18+
nodes: Incomplete | None = None,
19+
normalized: bool = False,
20+
): ...
21+
def degree_mixing_matrix(
22+
G,
23+
x: str = "out",
24+
y: str = "in",
25+
weight: Incomplete | None = None,
26+
nodes: Incomplete | None = None,
27+
normalized: bool = True,
28+
mapping: Incomplete | None = None,
29+
): ...
30+
def mixing_dict(xy, normalized: bool = False): ...
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from _typeshed import Incomplete
2+
3+
def average_neighbor_degree(
4+
G,
5+
source: str = "out",
6+
target: str = "out",
7+
nodes: Incomplete | None = None,
8+
weight: Incomplete | None = None,
9+
): ...
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from _typeshed import Incomplete
2+
from collections.abc import Generator
3+
4+
def node_attribute_xy(
5+
G, attribute, nodes: Incomplete | None = None
6+
) -> Generator[Incomplete, None, None]: ...
7+
def node_degree_xy(
8+
G,
9+
x: str = "out",
10+
y: str = "in",
11+
weight: Incomplete | None = None,
12+
nodes: Incomplete | None = None,
13+
) -> Generator[Incomplete, None, None]: ...
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def find_asteroidal_triple(G): ...
2+
def is_at_free(G): ...

0 commit comments

Comments
 (0)