Function pathfinding::undirected::connected_components::connected_components
source · pub fn connected_components<N, FN, IN>(
starts: &[N],
neighbours: FN
) -> Vec<HashSet<N>>
Expand description
Extract connected components from a graph.
starts
is a collection of vertices to be considered as start points.neighbours
is a function returning the neighbours of a given node.
This function returns a list of sets of nodes forming disjoint connected sets.