Skip to main content

connected_components

Function connected_components 

Source
pub fn connected_components(graph: &Graph) -> Vec<Vec<usize>>
Expand description

Returns the connected components of the graph (treating all edges as undirected).

Uses union-find. Each component is a sorted list of node indices.