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

pub fn connected_components<G>(g: G) -> usize where
    G: NodeCompactIndexable + IntoEdgeReferences

[Generic] Return the number of connected components of the graph.

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