rm CondaPkg environment
This commit is contained in:
Vendored
BIN
Binary file not shown.
.CondaPkg/env/Lib/site-packages/networkx/algorithms/traversal/__pycache__/beamsearch.cpython-311.pyc
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+5
-1
@@ -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`.
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user