Class FloydWarshallShortestPath<V,W>
java.lang.Object
org.episteme.core.mathematics.discrete.FloydWarshallShortestPath<V,W>
Floyd-Warshall algorithm for all-pairs shortest paths.
Computes shortest paths between all pairs of vertices in O(V³) time. Can handle negative weights but will detect negative cycles.
*
Reference:
Floyd, R. W. (1962). Algorithm 97: Shortest Path. Communications of the ACM, 5(6), 345.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAllPaths(WeightedGraph<V, W> graph) Computes all-pairs shortest paths.static <V> FloydWarshallShortestPath<V, Double> ofDouble()static <V> FloydWarshallShortestPath<V, Real> ofReal()
-
Constructor Details
-
FloydWarshallShortestPath
-
-
Method Details
-
ofDouble
-
ofReal
-
findAllPaths
-