aryagraph.algorithms.traversal.dfs_tree#

aryagraph.algorithms.traversal.dfs_tree(g: Graph, source: Hashable | None = None, *, depth_limit: int | None = None) → DiGraph[source]#

Depth-first search tree (forest when source=None) as a DiGraph.

Node and edge attributes are copied from g.