aryagraph.algorithms.traversal.bfs_tree#
- aryagraph.algorithms.traversal.bfs_tree(g: Graph, source: Hashable, *, reverse: bool = False, depth_limit: int | None = None) DiGraph[source]#
Breadth-first search tree rooted at source, as a
DiGraph.Arcs point away from the root. Node and edge attributes are copied from g (networkx’s
bfs_treedrops them).