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.
startsis a collection of vertices to be considered as start points.neighboursis a function returning the neighbours of a given node.
This function returns a list of sets of nodes forming disjoint connected sets.