Package com.jgalgo.alg
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 aTopologicalOrderAlgo
algorithm.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Comparator<V>
orderComparator()
Get a comparator that compare vertices by their order in the topological order.List<V>
orderedVertices()
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 Detail
-
orderedVertices
List<V> 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
int vertexOrderIndex(V 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)\)
-
orderComparator
default Comparator<V> 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
-
-