Interface TopologicalOrderAlgo


  • public interface TopologicalOrderAlgo
    Algorithm that calculate a topological order of graph vertices.

    A topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge \((u,v)\), \(u\) comes before \(v\) in the ordering. A topological ordering exist if and only if the graph is directed and acyclic (DAG).

    This algorithm compute the topological ordering of a given DAG graph in linear time and space.

    Use newInstance() to get a default implementation of this interface.

    Author:
    Barak Ugav
    See Also:
    Wikipedia