Package classycle.graph
Class StrongComponentProcessor
java.lang.Object
classycle.graph.GraphProcessor
classycle.graph.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.
- Author:
 - Franz-Josef Elmer
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinishProcessing(Vertex[] graph) Adds all arcs to the strong components.Returns the result ofGraphProcessor.deepSearchFirst(classycle.graph.Vertex[]).protected voidinitializeProcessing(Vertex[] graph) Initializes processing.protected voidprocessAfter(Vertex vertex) Processes the specified vertex after all its outgoing arcs are processed.protected voidprocessArc(Vertex tail, Vertex head) Processes the arc specified by tail and head vertices.protected voidprocessBefore(Vertex vertex) Processes the specified vertex before its outgoing arcs are processed.Methods inherited from class classycle.graph.GraphProcessor
deepSearchFirst, process 
- 
Constructor Details
- 
StrongComponentProcessor
public StrongComponentProcessor(boolean calculateAttributes) Creates an instance.- Parameters:
 calculateAttributes- If true the attributes of the strong components will be calculated. Otherwise not.
 
 - 
 - 
Method Details
- 
getStrongComponents
Returns the result ofGraphProcessor.deepSearchFirst(classycle.graph.Vertex[]). - 
initializeProcessing
Description copied from class:GraphProcessorInitializes processing. Will be called in methodGraphProcessor.deepSearchFirst(classycle.graph.Vertex[]).- Specified by:
 initializeProcessingin classGraphProcessor
 - 
processBefore
Description copied from class:GraphProcessorProcesses the specified vertex before its outgoing arcs are processed.- Specified by:
 processBeforein classGraphProcessor- Parameters:
 vertex- Vertex to be processed.- Throws:
 IllegalArgumentException- if vertex is not an instance ofAtomicVertex.
 - 
processArc
Description copied from class:GraphProcessorProcesses the arc specified by tail and head vertices.- Specified by:
 processArcin classGraphProcessor- Parameters:
 tail- Tail vertex of the arc.head- Head vertex of the arc.- Throws:
 IllegalArgumentException- if tail and head are not an instances ofAtomicVertex.
 - 
processAfter
Processes the specified vertex after all its outgoing arcs are processed.- Specified by:
 processAfterin classGraphProcessor- Parameters:
 vertex- Vertex to be processed.- Throws:
 IllegalArgumentException- if vertex is not an instance ofAtomicVertex.
 - 
finishProcessing
Adds all arcs to the strong components. There is an arc from a strong component to another one if there is at least one arc from a vertex of one component to a vertex the other one.- Specified by:
 finishProcessingin classGraphProcessor
 
 -