public class LongestWalkProcessor extends GraphProcessor
Constructor and Description |
---|
LongestWalkProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
finishProcessing(Vertex[] graph)
Finishes processing by sorting the result in accordance with the
walk length.
|
protected void |
initializeProcessing(Vertex[] graph)
Does nothing.
|
protected void |
processAfter(Vertex vertex)
Deactivate the specified vertex.
|
protected void |
processArc(Vertex tail,
Vertex head)
Processes arc from tail to head.
|
protected void |
processBefore(Vertex vertex)
Resets the specified vertex.
|
deepSearchFirst, process
protected void initializeProcessing(Vertex[] graph)
initializeProcessing
in class GraphProcessor
protected void processBefore(Vertex vertex)
processBefore
in class GraphProcessor
vertex
- Vertex to be processed.java.lang.IllegalArgumentException
- if vertex is not an instance
of StrongComponent
.protected void processArc(Vertex tail, Vertex head)
processArc
in class GraphProcessor
tail
- Tail vertex of the arc.head
- Head vertex of the arc.java.lang.IllegalArgumentException
- if both vertices are not instances
of StrongComponent
or if head is visited and
active which indicates a cycle in the graph.protected void processAfter(Vertex vertex)
processAfter
in class GraphProcessor
vertex
- Vertex to be processed.java.lang.IllegalArgumentException
- if vertex is not an instance
of StrongComponent
.protected void finishProcessing(Vertex[] graph)
finishProcessing
in class GraphProcessor