Package com.jgalgo.alg.shortestpath
Class ShortestPathSingleSourceCardinality
- java.lang.Object
-
- com.jgalgo.alg.shortestpath.ShortestPathSingleSourceAbstract
-
- com.jgalgo.alg.shortestpath.ShortestPathSingleSourceCardinality
-
- All Implemented Interfaces:
ShortestPathSingleSource
public class ShortestPathSingleSourceCardinality extends ShortestPathSingleSourceAbstract
Single Source Shortest Path for cardinality weight function.The cardinality length of a path is the number of edges in it. The cardinality shortest path from a source vertex to some other vertex is the path with the minimum number of edges. A simple BFS is performed from the source vertex until all vertices that can be reached are reached. The algorithm runs in linear time.
- Author:
- Barak Ugav
- See Also:
BfsIter
-
-
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 ShortestPathSingleSourceCardinality()
Create a cardinality BFS-based SSSP algorithm.
-
-
-
Constructor Detail
-
ShortestPathSingleSourceCardinality
public ShortestPathSingleSourceCardinality()
Create a cardinality BFS-based SSSP algorithm.Please prefer using
ShortestPathSingleSource.newInstance()
to get a default implementation for theShortestPathSingleSource
interface, orShortestPathSingleSource.builder()
for more customization options.
-
-