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 IntComparatorGet a comparator that compare vertices by their order in the topological order.Get all the vertices ordered in the list by the topological order.intvertexOrderIndex(int vertex) Get the index of a vertex in the topological order.default intvertexOrderIndex(Integer vertex) Deprecated.
-
Method Details
-
orderedVertices
IntList orderedVertices()Description copied from interface:TopologicalOrderAlgo.ResultGet all the vertices ordered in the list by the topological order.- Specified by:
orderedVerticesin 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:
vertexOrderIndexin 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.ResultGet a comparator that compare vertices by their order in the topological order.- Specified by:
orderComparatorin interfaceTopologicalOrderAlgo.Result<Integer,Integer> - Returns:
- a comparator that compare vertices by their order in the topological order
-
vertexOrderIndex(int)instead to avoid un/boxing.