Package dsa.lab11.solutions
Class TopologicalSorter
java.lang.Object
dsa.lab11.solutions.TopologicalSorter
Topological sort.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <Vertex,Weight> 
 Iterable<Vertex> sort(DirectedGraph<Vertex, Weight> dag) Get an iterable that yields each vertex of the given directed acyclic graph (DAG) in a topologically-sorted order.
- 
Constructor Details- 
TopologicalSorterpublic TopologicalSorter()
 
- 
- 
Method Details- 
sortGet an iterable that yields each vertex of the given directed acyclic graph (DAG) in a topologically-sorted order.- Type Parameters:
- Vertex- the vertex type
- Weight- the weight type
- Parameters:
- dag- the directed acyclic graph
- Returns:
- the topologically-sorted vertices
 
 
-