SCC.RunThe algorithm runs when Run(G) is called. The time complexity of the computation is O(V+E), where V is the number of vertices of the graph G and E is the number of its edges.
module G : sig ... endrepresentative maps each node to a representative element of its component.
scc maps the representative element of a component to a list of all members of this component. It maps a non-representative element to the empty list.
iter yield enumerates all components. For each component, the function yield is applied to this component's representative element and to a list of the component's elements. (This must be a nonempty list.) The components are enumerated in topological order: that is, a component is examined before its successors are examined.
rev_topological_iter yield enumerates all components. For each component, the function yield is applied to this component's representative element and to a list of the component's elements. (This must be a nonempty list.) The components are enumerated in reverse topological order: that is, a component is examined after its successors have been examined.
Like iter, map yield enumerates all components, in topological order. A list of the results produced by each invocation of yield is returned.
like rev_topological_iter, rev_map yield enumerates all components, in reverse topological order. It produces a list of results in topological order. That is, in comparison with map, the order of the traversal differs, but the order of the results in the result list is the same.