rm CondaPkg environment

This commit is contained in:
ton
2023-04-06 13:53:47 +07:00
parent 0a57ed7884
commit c43d949309
3329 changed files with 5725 additions and 447022 deletions

View File

@@ -236,6 +236,7 @@ def bfs_tree(G, source, reverse=False, depth_limit=None, sort_neighbors=None):
return T
@nx._dispatch
def bfs_predecessors(G, source, depth_limit=None, sort_neighbors=None):
"""Returns an iterator of predecessors in breadth-first-search from source.
@@ -300,6 +301,7 @@ def bfs_predecessors(G, source, depth_limit=None, sort_neighbors=None):
yield (t, s)
@nx._dispatch
def bfs_successors(G, source, depth_limit=None, sort_neighbors=None):
"""Returns an iterator of successors in breadth-first-search from source.
@@ -372,6 +374,7 @@ def bfs_successors(G, source, depth_limit=None, sort_neighbors=None):
yield (parent, children)
@nx._dispatch
def bfs_layers(G, sources):
"""Returns an iterator of all the layers in breadth-first search traversal.
@@ -414,7 +417,7 @@ def bfs_layers(G, sources):
# same distance from sources at each iteration
while current_layer:
yield current_layer
next_layer = list()
next_layer = []
for node in current_layer:
for child in G[node]:
if child not in visited:
@@ -423,6 +426,7 @@ def bfs_layers(G, sources):
current_layer = next_layer
@nx._dispatch
def descendants_at_distance(G, source, distance):
"""Returns all nodes at a fixed `distance` from `source` in `G`.

View File

@@ -16,6 +16,7 @@ REVERSE = "reverse"
__all__ = ["edge_bfs"]
@nx._dispatch
def edge_bfs(G, source=None, orientation=None):
"""A directed, breadth-first-search of edges in `G`, beginning at `source`.
@@ -157,7 +158,7 @@ def edge_bfs(G, source=None, orientation=None):
check_reverse = directed and orientation in ("reverse", "ignore")
# start BFS
visited_nodes = {n for n in nodes}
visited_nodes = set(nodes)
visited_edges = set()
queue = deque([(n, edges_from(n)) for n in nodes])
while queue: