public class TopologicalSorting extends GraphTraversal
OK, TERMINATEDBYVISITOR| Constructor and Description |
|---|
TopologicalSorting(DirectedAcyclicGraph dag)
Creates an instance of TopologicalSorting that will perform a
topological sort against a directed acyclic graph.
|
| Modifier and Type | Method and Description |
|---|---|
List |
reverseTraverse()
Perform a reverse topological sort of the entire directed acyclic graph.
|
List |
reverseTraverse(Vertex startat)
Perform a reverse topological sort of the subgraph reachable via
outgoing edges from a specific vertex.
|
List |
traverse()
Perform a topological sort of the entire directed acyclic graph.
|
List |
traverse(Vertex startat)
Perform a topological sort of the subgraph reachable via outgoing
edges from a specific vertex.
|
int |
traverse(Vertex startat,
List visited,
Visitor visitor)
Perform a topological sort of the subgraph reachable via outgoing
edges from a specific vertex.
|
List |
traverse(Vertex startat,
Visitor visitor)
Perform a topological sort of the subgraph reachable via outgoing
edges from a specific vertex.
|
public TopologicalSorting(DirectedAcyclicGraph dag)
dag - The DirectedAcyclicGraph on which topological sorting will be
performed.public int traverse(Vertex startat, List visited, Visitor visitor)
traverse in class GraphTraversalstartat - The Vertex to which you want to start the traversal.visited - List of vertices that has been visited,
in the sequence they were visited; must be empty
initiallyvisitor - Visitor object to visit each vertex as they are visited.
Return value of the visitor is ignored.public List traverse(Vertex startat, Visitor visitor)
traverse in class GraphTraversalstartat - 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 List traverse(Vertex startat)
traverse in class GraphTraversalstartat - The Vertex to which you want to start the traversal.public List reverseTraverse(Vertex startat)
startat - The Vertex to which you want to start the traversal.public List traverse()
public List reverseTraverse()
Copyright © 2019 JULIE Lab, Germany. All rights reserved.