Function pathfinding::components [] [src]

pub fn components<N>(groups: &[Vec<N>]) -> Vec<HashSet<N>> where
    N: Clone + Hash + Eq

Separate components of a graph into closed sets.

  • groups is a set of group of vertices connected together. It is acceptable for a group to contain only one node.

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