Returns the number of strong components.
the number of strong components
Returns the component id of the strong component containing vertex v
.
the vertex.
the component id of the strong component containing vertex v
or -1 if the
vertex is not in the graph.
Generated using TypeDoc
Represents a data type for determining the strong components in a digraph. The id operation determines in which strong component a given vertex lies; the areStronglyConnected operation determines whether two vertices are in the same strong component; and the count operation determines the number of strong components. The component identifier of a component is one of the vertices in the strong component: two vertices have the same component identifier if and only if they are in the same strong component.
For additional documentation, see Section 4.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.