Package com.jgalgo.alg.shortestpath
Class ShortestPathSingleSourceDag
- java.lang.Object
-
- com.jgalgo.alg.shortestpath.ShortestPathSingleSourceAbstract
-
- com.jgalgo.alg.shortestpath.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jgalgo.alg.shortestpath.ShortestPathSingleSource
ShortestPathSingleSource.Builder, ShortestPathSingleSource.IResult, ShortestPathSingleSource.Result<V,E>
-
-
Constructor Summary
Constructors Constructor Description ShortestPathSingleSourceDag()
Create a SSSP algorithm for directed acyclic graphs (DAG).
-
-
-
Constructor Detail
-
ShortestPathSingleSourceDag
public ShortestPathSingleSourceDag()
Create a SSSP algorithm for directed acyclic graphs (DAG).Please prefer using
ShortestPathSingleSource.newInstance()
to get a default implementation for theShortestPathSingleSource
interface, orShortestPathSingleSource.builder()
for more customization options.
-
-