|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclassycle.graph.GraphProcessor
classycle.graph.StrongComponentProcessor
public class StrongComponentProcessor
A processor which extracts the strong components of a directed graph. A strong component is a maximal strongly connected subgraph of a directed graph. The implementation is based on Tarjan's algorithm.
Constructor Summary | |
---|---|
StrongComponentProcessor(boolean calculateAttributes)
Creates an instance. |
Method Summary | |
---|---|
protected void |
finishProcessing(Vertex[] graph)
Adds all arcs to the strong components. |
StrongComponent[] |
getStrongComponents()
Returns the result of GraphProcessor.deepSearchFirst(classycle.graph.Vertex[]) . |
protected void |
initializeProcessing(Vertex[] graph)
Initializes processing. |
protected void |
processAfter(Vertex vertex)
Processes the specified vertex after all its outgoing arcs are processed. |
protected void |
processArc(Vertex tail,
Vertex head)
Processes the arc specified by tail and head vertices. |
protected void |
processBefore(Vertex vertex)
Processes the specified vertex before its outgoing arcs are processed. |
Methods inherited from class classycle.graph.GraphProcessor |
---|
deepSearchFirst, process |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrongComponentProcessor(boolean calculateAttributes)
calculateAttributes
- If true the attributes of the
strong components will be calculated. Otherwise not.Method Detail |
---|
public StrongComponent[] getStrongComponents()
GraphProcessor.deepSearchFirst(classycle.graph.Vertex[])
.
protected void initializeProcessing(Vertex[] graph)
GraphProcessor
GraphProcessor.deepSearchFirst(classycle.graph.Vertex[])
.
initializeProcessing
in class GraphProcessor
protected void processBefore(Vertex vertex)
GraphProcessor
processBefore
in class GraphProcessor
vertex
- Vertex to be processed.
java.lang.IllegalArgumentException
- if vertex is not an instance
of AtomicVertex
.protected void processArc(Vertex tail, Vertex head)
GraphProcessor
processArc
in class GraphProcessor
tail
- Tail vertex of the arc.head
- Head vertex of the arc.
java.lang.IllegalArgumentException
- if tail and head are
not an instances of AtomicVertex
.protected void processAfter(Vertex vertex)
processAfter
in class GraphProcessor
vertex
- Vertex to be processed.
java.lang.IllegalArgumentException
- if vertex is not an instance
of AtomicVertex
.protected void finishProcessing(Vertex[] graph)
finishProcessing
in class GraphProcessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |