petgraph::algo

Function connected_components

Source
pub fn connected_components<G>(g: G) -> usize
Expand description

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

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