Package com.jgalgo.alg
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 aTopologicalOrderAlgoalgorithm forIntGraph.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default IntComparatororderComparator()Get a comparator that compare vertices by their order in the topological order.IntListorderedVertices()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.Please usevertexOrderIndex(int)instead to avoid un/boxing.
-
-
-
Method Detail
-
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 default int vertexOrderIndex(Integer vertex)
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
default IntComparator 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
-
-