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: