|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpaul.Graphs.SCComponent<Vertex>
public final class SCComponent<Vertex>
SCComponent models a strongly-connected
component of a directed graph: a set of vertices such that
there is a path between any two of them.
The main way of spliting a digraph into SCComponents
is using the method buildScc. Alternatively, given a
DiGraph, one may construct a
TopSortedCompDiGraph (using its constructor).
DiGraph,
TopSortedCompDiGraph,
buildScc(jpaul.Graphs.DiGraph) ,
Serialized Form| Method Summary | ||
|---|---|---|
static
|
buildScc(DiGraph<Vertex> diGraph)
Splits a directed graph into the set of its strongly-connected components. |
|
int |
compareTo(SCComponent<Vertex> scc2)
|
|
boolean |
contains(Vertex node)
Checks whether node belongs to this \
strongly connected component. |
|
java.util.List<Vertex> |
entries()
Returns the entry nodes of this strongly
connected component. |
|
java.util.List<Vertex> |
exits()
Returns the exit nodes of this strongly connected
component. |
|
int |
getId()
Returns the numeric ID of this SCComponent. |
|
static
|
getSccNavigator()
Default navigator through a component graph (a diGraph of strongly-connected components). |
|
boolean |
isLoop()
Checks whether this strongly connected component
corresponds to a loop, ie it has at least one arc to
itself. |
|
java.util.List<SCComponent<Vertex>> |
next()
Returns the successors. |
|
java.util.Collection<Vertex> |
nodes()
Returns the nodes of this strongly connected component
(set version). |
|
java.util.List<SCComponent<Vertex>> |
prev()
Returns the predecessors. |
|
int |
size()
Returns the number of nodes in this strongly connected
component. |
|
java.lang.String |
toString()
Pretty-print method for debugging. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <Vertex> Navigator<SCComponent<Vertex>> getSccNavigator()
public static final <Vertex> java.util.Set<SCComponent<Vertex>> buildScc(DiGraph<Vertex> diGraph)
diGraph - Directed graph
public int getId()
this SCComponent.
Just for debug purposes ...
public final boolean isLoop()
this strongly connected component
corresponds to a loop, ie it has at least one arc to
itself.
public int compareTo(SCComponent<Vertex> scc2)
compareTo in interface java.lang.Comparable<SCComponent<Vertex>>public final java.util.List<SCComponent<Vertex>> next()
public final java.util.List<SCComponent<Vertex>> prev()
public final java.util.Collection<Vertex> nodes()
this strongly connected component
(set version).
public final int size()
this strongly connected
component.
public final boolean contains(Vertex node)
node belongs to this \
strongly connected component.
public final java.util.List<Vertex> entries()
this strongly
connected component. These are the nodes that are reachable
from outside the component.
public final java.util.List<Vertex> exits()
this strongly connected
component. These are the nodes that have arcs toward nodes
outside the component.
public final java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||