ix.util
Class FullTransitiveClosure
java.lang.Object
ix.util.FullTransitiveClosure
- All Implemented Interfaces:
- DirectedGraph, TransitiveClosure
public class FullTransitiveClosure
- extends java.lang.Object
- implements TransitiveClosure
The transitive closure of a relation (cycles are allowed).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
baseGraph
DirectedGraph baseGraph
successorMap
java.util.Map successorMap
FullTransitiveClosure
public FullTransitiveClosure(DirectedGraph g)
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()
- Constructs the transitive closure using Warshall's algorithm.