|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsalvo.jesus.graph.algorithm.GraphTraversal
salvo.jesus.graph.algorithm.TopologicalSorting
public class TopologicalSorting
A concrete subclass of GraphTraversal that performs a topological sort against a directed acyclic graph.
Field Summary | |
---|---|
(package private) DirectedAcyclicGraph |
dag
|
Fields inherited from class salvo.jesus.graph.algorithm.GraphTraversal |
---|
graph, OK, TERMINATEDBYVISITOR |
Constructor Summary | |
---|---|
TopologicalSorting(DirectedAcyclicGraph dag)
Creates an instance of TopologicalSorting that will perform a topological sort against a directed acyclic graph. |
Method Summary | |
---|---|
java.util.Vector |
reverseTraverse()
Perform a reverse topological sort of the entire directed acyclic graph. |
java.util.Vector |
reverseTraverse(Vertex startat)
Perform a reverse topological sort of the connected set of a directed acyclic graph to which Vertex startat belongs, starting at Vertex startat. |
java.util.Vector |
traverse()
Perform a topological sort of the entire directed acyclic graph. |
java.util.Vector |
traverse(Vertex startat)
Perform a topological sort of the connected set of a directed acyclic graph to which Vertex startat belongs, starting at Vertex startat. |
int |
traverse(Vertex startat,
java.util.Vector visited,
Visitor visitor)
Perform a topological sort of the connected set of a directed acyclic graph to which Vertex startat belongs, starting at Vertex startat. |
java.util.Vector |
traverse(Vertex startat,
Visitor visitor)
Perform a topological sort of the connected set of a directed acyclic graph to which Vertex startat belongs, starting at Vertex startat. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
DirectedAcyclicGraph dag
Constructor Detail |
---|
public TopologicalSorting(DirectedAcyclicGraph dag)
dag
- The DirectedAcyclicGraph on which topological sorting will be performed.Method Detail |
---|
public int traverse(Vertex startat, java.util.Vector visited, Visitor visitor)
traverse
in class GraphTraversal
startat
- The Vertex to which you want to start the traversal.visited
- Vector of vertices that has been visited,
in the sequence they were visited.visitor
- Visitor object to visit each vertex as they are visited.
Return value of the visitor is ignored.public java.util.Vector traverse(Vertex startat, Visitor visitor)
traverse
in class GraphTraversal
startat
- The Vertex to which you want to start the traversal.visitor
- Visitor object to visit each vertex as they are visited.
Return value of the visitor is ignored.
public java.util.Vector traverse(Vertex startat)
traverse
in class GraphTraversal
startat
- The Vertex to which you want to start the traversal.
public java.util.Vector reverseTraverse(Vertex startat)
startat
- The Vertex to which you want to start the traversal.
public java.util.Vector traverse()
public java.util.Vector reverseTraverse()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |