ix.util
Class DAGTransitiveClosure

java.lang.Object
  extended by ix.util.DAGTransitiveClosure
All Implemented Interfaces:
DirectedGraph, TransitiveClosure

public class DAGTransitiveClosure
extends java.lang.Object
implements TransitiveClosure

The transitive closure of a directed acyclic graph (DAG).


Field Summary
(package private)  DirectedGraph baseGraph
           
protected  java.lang.Object START_MARK
           
(package private)  java.util.Map successorMap
           
 
Constructor Summary
DAGTransitiveClosure(DirectedGraph g)
           
 
Method Summary
protected  void computeTransitiveClosure()
           
 java.util.Collection getAllNodes()
           
 java.util.Collection getRoots()
           
 java.util.Collection getSuccessors(java.lang.Object node)
           
 boolean isBefore(java.lang.Object v1, java.lang.Object v2)
           
protected  void walk(java.util.Collection items)
           
protected  void walkVertex(java.lang.Object at)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseGraph

DirectedGraph baseGraph

successorMap

java.util.Map successorMap

START_MARK

protected java.lang.Object START_MARK
Constructor Detail

DAGTransitiveClosure

public DAGTransitiveClosure(DirectedGraph g)
Method Detail

getAllNodes

public java.util.Collection getAllNodes()
Specified by:
getAllNodes in interface DirectedGraph

getRoots

public java.util.Collection getRoots()
Specified by:
getRoots in interface DirectedGraph

getSuccessors

public java.util.Collection getSuccessors(java.lang.Object node)
Specified by:
getSuccessors in interface DirectedGraph

isBefore

public boolean isBefore(java.lang.Object v1,
                        java.lang.Object v2)
Specified by:
isBefore in interface DirectedGraph

computeTransitiveClosure

protected void computeTransitiveClosure()

walk

protected void walk(java.util.Collection items)

walkVertex

protected void walkVertex(java.lang.Object at)