Class ShortestPathSingleSourceDag

  • All Implemented Interfaces:
    ShortestPathSingleSource

    public class ShortestPathSingleSourceDag
    extends ShortestPathSingleSourceAbstract
    Linear Single Source Shortest Path (SSSP) algorithm for directed acyclic graphs (DAG).

    The algorithm first compute a topological sorting of the vertices in linear time, and then traverse the vertices in that order and determine the distance for each one of them.

    Author:
    Barak Ugav
    See Also:
    TopologicalOrderAlgo