Package com.jgalgo.alg.shortestpath
Class ShortestPathSingleSourceCardinality
java.lang.Object
com.jgalgo.alg.shortestpath.ShortestPathSingleSourceAbstract
com.jgalgo.alg.shortestpath.ShortestPathSingleSourceCardinality
- All Implemented Interfaces:
ShortestPathSingleSource
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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jgalgo.alg.shortestpath.ShortestPathSingleSource
ShortestPathSingleSource.Builder, ShortestPathSingleSource.IResult, ShortestPathSingleSource.Result<V,
E> -
Constructor Summary
ConstructorDescriptionCreate a cardinality BFS-based SSSP algorithm. -
Method Summary
Methods inherited from class com.jgalgo.alg.shortestpath.ShortestPathSingleSourceAbstract
computeShortestPaths
-
Constructor Details
-
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.
-