Package com.jgalgo.alg.dag
Interface TopologicalOrderAlgo.IResult
- All Superinterfaces:
TopologicalOrderAlgo.Result<Integer,
Integer>
- Enclosing interface:
TopologicalOrderAlgo
public static interface TopologicalOrderAlgo.IResult
extends TopologicalOrderAlgo.Result<Integer,Integer>
A result object of a
TopologicalOrderAlgo
algorithm for IntGraph
.- Author:
- Barak Ugav
-
Method Summary
Modifier and TypeMethodDescriptiondefault IntComparator
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
(int vertex) Get the index of a vertex in the topological order.default int
vertexOrderIndex
(Integer vertex) Deprecated.
-
Method Details
-
orderedVertices
IntList orderedVertices()Description copied from interface:TopologicalOrderAlgo.Result
Get all the vertices ordered in the list by the topological order.- Specified by:
orderedVertices
in interfaceTopologicalOrderAlgo.Result<Integer,
Integer> - Returns:
- all the vertices ordered in the list by the topological order
-
vertexOrderIndex
int vertexOrderIndex(int vertex) 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)\)
-
vertexOrderIndex
Deprecated.Please usevertexOrderIndex(int)
instead to avoid un/boxing.Get the index of a vertex in the topological order.- Specified by:
vertexOrderIndex
in interfaceTopologicalOrderAlgo.Result<Integer,
Integer> - Parameters:
vertex
- the vertex- Returns:
- the index of the vertex in the topological order, in range \([0, n)\)
-
orderComparator
Description copied from interface:TopologicalOrderAlgo.Result
Get a comparator that compare vertices by their order in the topological order.- Specified by:
orderComparator
in interfaceTopologicalOrderAlgo.Result<Integer,
Integer> - Returns:
- a comparator that compare vertices by their order in the topological order
-
vertexOrderIndex(int)
instead to avoid un/boxing.