Module Components.Make
Functor providing functions to compute strongly connected components of a graph.
Parameters
Signature
val scc : G.t -> int * (G.V.t -> int)scc gcomputes the strongly connected components ofg. The result is a pair(n,f)wherenis the number of components. Components are numbered from0ton-1, andfis a function mapping each vertex to its component number. In particular,f u = f vif and only ifuandvare in the same component. Another property of the numbering is that components are numbered in a topological order: if there is an arc fromutov, thenf u >= f uNot tail-recursive. Complexity: O(V+E) The function returned has complexity O(1)