connected_components

Function connected_components 

Source
pub fn connected_components<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
) -> Vec<Component<N>> 
where N: Node + Debug, E: EdgeWeight, Ix: IndexType,
Expand description

Finds all connected components in an undirected graph

§Arguments

  • graph - The graph to analyze

§Returns

  • A vector of connected components, where each component is a set of nodes