Package com.jgalgo.alg.dag
Interface TopologicalOrderAlgo.Result<V,E>
- Type Parameters:
V
- the vertices typeE
- the edges type
- All Known Subinterfaces:
TopologicalOrderAlgo.IResult
- Enclosing interface:
TopologicalOrderAlgo
public static interface TopologicalOrderAlgo.Result<V,E>
A result object of a
TopologicalOrderAlgo
algorithm.- Author:
- Barak Ugav
-
Method Summary
Modifier and TypeMethodDescriptiondefault Comparator
<V> Get a comparator that compare vertices by their order in the topological order.Get all the vertices ordered in the list by the topological order.int
vertexOrderIndex
(V vertex) Get the index of a vertex in the topological order.
-
Method Details
-
orderedVertices
Get all the vertices ordered in the list by the topological order.- Returns:
- all the vertices ordered in the list by the topological order
-
vertexOrderIndex
Get the index of a vertex in the topological order.- Parameters:
vertex
- the vertex- Returns:
- the index of the vertex in the topological order, in range \([0, n)\)
-
orderComparator
Get a comparator that compare vertices by their order in the topological order.- Returns:
- a comparator that compare vertices by their order in the topological order
-