Function pathfinding::component_index [] [src]

pub fn component_index<N>(components: &[HashSet<N>]) -> HashMap<N, usize> where
    N: Clone + Hash + Eq

Locate vertices amongst disjoint sets.

  • components are disjoint vertices sets.

This function returns a map between every vertex and the index of the set it belongs to in the components list.