|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.partitioner.Topological
public class Topological
Does a topological sort on the Partition.
| Field Summary | |
|---|---|
private int[] |
mInDegree
An array that contains the number of incoming edges to a node. |
private Map |
mIndexMap
A Map that returns the index into mInDegree map for a particular node in graph. |
private Partition |
mPartition
The partition that has to be sorted. |
| Constructor Summary | |
|---|---|
Topological(Partition p)
The overloaded constructor. |
|
| Method Summary | |
|---|---|
protected Map |
childrenRepresentation()
Returns a map that is index by GraphNode ID's and each value is the list of ID's of children of that GraphNode. |
private int |
index(String id)
Returns the index of a particular node. |
void |
initialize()
Initializes the inDegree for each node of the partition. |
List |
sort()
Topologically sorts the partition and returns a List of GraphNode elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Partition mPartition
private int[] mInDegree
private Map mIndexMap
mInDegree| Constructor Detail |
|---|
public Topological(Partition p)
p - the partition that has to be sorted.| Method Detail |
|---|
public void initialize()
public List sort()
GraphNode elements. The iterator of the list, returns
the elements in the topological order.
GraphNode objectsprotected Map childrenRepresentation()
private int index(String id)
id - the id of the node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||