Function pathfinding::undirected::connected_components::components
source · pub fn components<N>(groups: &[Vec<N>]) -> Vec<HashSet<N>>
Expand description
Separate components of an undirected graph into disjoint 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 forming disjoint connected sets.