[][src]Function pathfinding::directed::strongly_connected_components::strongly_connected_components_from

pub fn strongly_connected_components_from<N, FN, IN>(
    start: &N,
    successors: FN
) -> Vec<Vec<N>> where
    N: Clone + Hash + Eq,
    FN: FnMut(&N) -> IN,
    IN: IntoIterator<Item = N>, 

Partition nodes reachable from a starting point into strongly connected components.

  • start is the node we want to explore the graph from.
  • successors returns a list of successors for a given node.

The function returns a list of strongly connected components sets. It will contain at least one component (the one containing the start node).