Module com.aoapps.hodgepodge
Package com.aoapps.hodgepodge.graph
Class TopologicalSorter<V,Ex extends Exception>
java.lang.Object
com.aoapps.hodgepodge.graph.TopologicalSorter<V,Ex>
- Type Parameters:
Ex
- An arbitrary exception type that may be thrown
- All Implemented Interfaces:
GraphSorter<V,
Ex>
Performs a topological sort of all the vertices in the provided symmetric multi graph.
If forward, objects with no edges directed out are first. If backward, objects with no edges directed in are first.
See https://wikipedia.org/wiki/Topological_sorting#Algorithms
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorDescriptionTopologicalSorter
(SymmetricMultiGraph<V, ?, ? extends Ex> graph, boolean isForward) -
Method Summary
-
Constructor Details
-
TopologicalSorter
-
-
Method Details
-
sortGraph
- Specified by:
sortGraph
in interfaceGraphSorter<V,
Ex extends Exception> - Throws:
CycleException
Ex
-