wt.epm.retriever.graph
Class AbstractGraph.GraphAnalyzer
java.lang.Object
wt.epm.retriever.graph.AbstractGraph.GraphAnalyzer
- Enclosing class:
- AbstractGraph
- private class AbstractGraph.GraphAnalyzer
- extends Object
Auxiliary inner class to eliminate some code reduplication
while initializing the graph.
Method Summary |
protected void |
analyseGraph()
Build the spanning tree (or forest) of this graph. |
protected boolean |
checkConsistency()
|
private void |
checkForCycles(GraphEdge link)
GraphLink creates a cycle if its 2nd node is reachable from its 1st node
with backward traversing of "spanning tree" links. |
protected void |
traverse(GraphNode node)
Depth-first traverse from a given node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
traversedNode
private boolean[] traversedNode
passedNodes
private int passedNodes
AbstractGraph.GraphAnalyzer
private AbstractGraph.GraphAnalyzer()
analyseGraph
protected final void analyseGraph()
- Build the spanning tree (or forest) of this graph. Initialize rootNodes array.
Perform classification of all links regarding the structure of the graph.
Algorithm is based on depth-first traverse and has almost linear complexity.
- Throws:
???
checkForCycles
private void checkForCycles(GraphEdge link)
- GraphLink creates a cycle if its 2nd node is reachable from its 1st node
with backward traversing of "spanning tree" links.
- Parameters:
link
- GraphLink to be checked
traverse
protected final void traverse(GraphNode node)
- Depth-first traverse from a given node. Calls itself recursively.
- Parameters:
node
- GraphNode
checkConsistency
protected final boolean checkConsistency()