retworkx.graph_dfs_edges¶
- graph_dfs_edges(graph, /, source=None)¶
Get edge list in depth first order
- Parameters
graph (PyGraph) – The graph to get the DFS edge list from
source (int) – An optional node index to use as the starting node for the depth-first search. The edge list will only return edges in the components reachable from this index. If this is not specified then a source will be chosen arbitrarly and repeated until all components of the graph are searched.
- Returns
A list of edges as a tuple of the form
(source, target)
in depth-first order- Return type