public class TarjanSCC
extends java.lang.Object
| Constructor and Description |
|---|
TarjanSCC(Automaton G)
Computes the strong components of the digraph
G. |
| Modifier and Type | Method and Description |
|---|---|
int |
count()
Returns the number of strong components.
|
int |
id(int v)
Returns the component id of the strong component containing vertex
v. |
boolean |
stronglyConnected(int v,
int w)
Are vertices
v and w in the same strong component? |
public TarjanSCC(Automaton G)
G.G - the digraphpublic int count()
public boolean stronglyConnected(int v,
int w)
v and w in the same strong component?v - one vertexw - the other vertextrue if vertices v and w are in the same
strong component, and false otherwisejava.lang.IllegalArgumentException - unless 0 <= v < Vjava.lang.IllegalArgumentException - unless 0 <= w < Vpublic int id(int v)
v.v - the vertexvjava.lang.IllegalArgumentException - unless 0 <= v < V