Function pathfinding::undirected::connected_components::connected_components[][src]

pub fn connected_components<N, FN, IN>(
    starts: &[N],
    neighbours: FN
) -> Vec<HashSet<N>> where
    N: Clone + Hash + Eq,
    FN: FnMut(&N) -> IN,
    IN: IntoIterator<Item = N>, 

Extract connected components from a graph.

This function returns a list of sets of nodes forming disjoint connected sets.