Function pathfinding::undirected::connected_components::component_index [−][src]
#[must_use]
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.