Function petgraph::algo::connected_components
source ยท pub fn connected_components<G>(g: G) -> usizewhere
G: NodeCompactIndexable + IntoEdgeReferences,
Expand description
[Generic] Return the number of connected components of the graph.
For a directed graph, this is the weakly connected components.