ix.util
Class TopologicalSorter
java.lang.Object
ix.util.TopologicalSorter
- Direct Known Subclasses:
- PlanCheckingSimulator.ExecOrderSorter, SimpleRSim.ExecOrderSorter
public abstract class TopologicalSorter
- extends java.lang.Object
DAG topological sort, returning ancestors before descendents.
You should make a new sorter each time.
Method Summary |
protected abstract java.util.Collection |
getChildren(java.lang.Object node)
|
java.util.List |
sort(java.util.Collection roots)
|
protected void |
walk(java.util.Collection items)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TopologicalSorter
public TopologicalSorter()
sort
public java.util.List sort(java.util.Collection roots)
walk
protected void walk(java.util.Collection items)
getChildren
protected abstract java.util.Collection getChildren(java.lang.Object node)