| java.lang.Object org.griphyn.vdl.planner.Topology
Topology | public class Topology (Code) | | Class which implements a topological sort of a graph.
author: Jens-S. Vöckler author: Yong Zhao version: $Revision: 50 $ See Also: Graph |
Constructor Summary | |
public | Topology(Graph graph) Constructor, given a graph, construct internal objects
needed for topological sort. |
Method Summary | |
public void | init() Initializes in-degree array and the corresponding 0 in-degree
queue. | public static void | main(String[] args) The main method contains some simple tests for the sorting algorithms.
The graph to test with is read from stdin. | public String[] | sort() Sorts the graph topologically. | public String[] | stageSort() Sorts the graph topologically, but also with regards to stages. |
Topology | public Topology(Graph graph)(Code) | | Constructor, given a graph, construct internal objects
needed for topological sort.
Parameters: graph - is a graph representation. |
init | public void init()(Code) | | Initializes in-degree array and the corresponding 0 in-degree
queue.
|
main | public static void main(String[] args)(Code) | | The main method contains some simple tests for the sorting algorithms.
The graph to test with is read from stdin.
Parameters: args - are commandline arguments. |
sort | public String[] sort()(Code) | | Sorts the graph topologically. It first invokes the
Topology.init()
method to start the graph over, and initialize data structures.
A sorted list of vortex names. |
stageSort | public String[] stageSort()(Code) | | Sorts the graph topologically, but also with regards to stages. It
first invokes the
Topology.init() method to start the graph over,
and initialize data structures.
a sorted list of zero in-degree vertices. |
|
|