Function petgraph::algo::connected_components [] [src]

pub fn connected_components<N, E, Ty, Ix>(g: &Graph<N, E, Ty, Ix>) -> usize where Ty: EdgeType, Ix: IndexType

Return the number of connected components of the graph.

For a directed graph, this is the weakly connected components.