Class FloydWarshall<T>

  • Type Parameters:
    T - node type in the graph

    public class FloydWarshall<T>
    extends java.lang.Object
    Floyd-Warshall algorithm to compute all-pairs shortest path in graph with no negative cycles. TODO: this API should be cleaned up.
    • Constructor Detail

    • Method Detail

      • edgeCost

        protected int edgeCost()
      • pathCallback

        protected void pathCallback​(int i,
                                    int j,
                                    int k)
      • allPairsShortestPaths

        public int[][] allPairsShortestPaths()
      • shortestPathLengths

        public static <T> int[][] shortestPathLengths​(NumberedGraph<T> G)