Function petgraph::algo::tarjan_scc [] [src]

pub fn tarjan_scc<G>(g: G) -> Vec<Vec<G::NodeId>> where G: IntoNodeIdentifiers + IntoNeighbors + NodeIndexable

[Generic] Compute the strongly connected components using Tarjan's algorithm.

Return a vector where each element is an scc.

For an undirected graph, the sccs are simply the connected components.