Interface FloydWarshallUtil.AllPairsResult<V>
- Type Parameters:
V- the vertex type | 顶点类型
- Enclosing class:
FloydWarshallUtil
public static interface FloydWarshallUtil.AllPairsResult<V>
All-pairs shortest path result.
全源最短路径结果。
- Since:
- JDK 25, opencode-base-graph V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the shortest distance between two vertices.Get the full distance matrix as a nested map.booleanCheck if a negative cycle exists in the graph.Get the shortest path between two vertices.
-
Method Details
-
distance
-
path
-
hasNegativeCycle
boolean hasNegativeCycle()Check if a negative cycle exists in the graph. 检查图中是否存在负环。- Returns:
- true if a negative cycle exists | 如果存在负环返回true
-
distanceMatrix
-