|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.string.directedgraph.StronglyConnectedComponents<N,C>
public class StronglyConnectedComponents<N extends GraphNode,C extends GraphComponent<N>>
Finds strongly connected components of a directed graph.
Constructor Summary | |
---|---|
StronglyConnectedComponents(DirectedGraph<N,C> g)
Finds strongly connected components using Tarjan's algorithm. |
Method Summary | |
---|---|
void |
add(N n,
C c)
Adds a new node to a component. |
C |
getComponent(N n)
Returns the component of the given node. |
Collection<C> |
getComponents()
Returns the (unmodifiable) collection of components. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StronglyConnectedComponents(DirectedGraph<N,C> g)
Method Detail |
---|
public void add(N n, C c)
public C getComponent(N n)
public Collection<C> getComponents()
public String toString()
toString
in class Object
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |