wt.epm.retriever.graph
Class AbstractGraph.GraphAnalyzer

java.lang.Object
  extended bywt.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.


Field Summary
private  int passedNodes
           
private  boolean[] traversedNode
           
 
Constructor Summary
private AbstractGraph.GraphAnalyzer()
           
 
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
 

Field Detail

traversedNode

private boolean[] traversedNode

passedNodes

private int passedNodes
Constructor Detail

AbstractGraph.GraphAnalyzer

private AbstractGraph.GraphAnalyzer()
Method Detail

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()