Interface TopologicalOrderAlgo.Result<V,E>

Type Parameters:
V - the vertices type
E - 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 Type
    Method
    Description
    default 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
    Get the index of a vertex in the topological order.
  • Method Details

    • 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