depth_first_search_digraph

Function depth_first_search_digraph 

Source
pub fn depth_first_search_digraph<N, E, Ix>(
    graph: &DiGraph<N, E, Ix>,
    source: &N,
) -> Result<Vec<N>>
where N: Node + Debug, E: EdgeWeight, Ix: IndexType,
Expand description

Performs depth-first search (DFS) from a given starting node in a directed graph

§Arguments

  • graph - The directed graph to traverse
  • source - The source node

§Returns

  • Result<Vec<N>> - The nodes visited in DFS order