Function pathfinding::undirected::connected_components::component_index
source · pub fn component_index<N>(components: &[HashSet<N>]) -> HashMap<N, usize>
Expand description
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.