Package com.jgalgo.alg.shortestpath
Class ShortestPathAllPairsCardinality
- java.lang.Object
-
- com.jgalgo.alg.shortestpath.ShortestPathAllPairsAbstract
-
- com.jgalgo.alg.shortestpath.ShortestPathAllPairsCardinality
-
- All Implemented Interfaces:
ShortestPathAllPairs
public class ShortestPathAllPairsCardinality extends ShortestPathAllPairsAbstract
All pairs cardinality shortest path algorithm.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. This algorithm compute the cardinality shortest path between each pair of vertices in a graph. The algorithm simple perform
ShortestPathSingleSourceCardinality
\(n\) times.This algorithm runs in \(O(n(n+m))\).
- Author:
- Barak Ugav
- See Also:
ShortestPathSingleSourceCardinality
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jgalgo.alg.shortestpath.ShortestPathAllPairs
ShortestPathAllPairs.Builder, ShortestPathAllPairs.IResult, ShortestPathAllPairs.Result<V,E>
-
-
Constructor Summary
Constructors Constructor Description ShortestPathAllPairsCardinality()
Create a APSP algorithm for cardinality weight function only.
-
Method Summary
-
Methods inherited from class com.jgalgo.alg.shortestpath.ShortestPathAllPairsAbstract
computeAllShortestPaths, computeSubsetShortestPaths
-
-
-
-
Constructor Detail
-
ShortestPathAllPairsCardinality
public ShortestPathAllPairsCardinality()
Create a APSP algorithm for cardinality weight function only.Please prefer using
ShortestPathAllPairs.newInstance()
to get a default implementation for theShortestPathAllPairs
interface, orShortestPathAllPairs.builder()
for more customization options.
-
-