Function petgraph::algo::condensation

source ยท
pub fn condensation<N, E, Ty, Ix>(
    g: Graph<N, E, Ty, Ix>,
    make_acyclic: bool,
) -> Graph<Vec<N>, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,
Expand description

Graph Condense every strongly connected component into a single node and return the result.

If make_acyclic is true, self-loops and multi edges are ignored, guaranteeing that the output is acyclic.