com.mhhe.clrs2e
Class APSPMatrixMult

java.lang.Object
  |
  +--com.mhhe.clrs2e.AllPairsShortestPaths
        |
        +--com.mhhe.clrs2e.APSPMatrixMult
Direct Known Subclasses:
FasterAllPairsShortestPaths, SlowAllPairsShortestPaths

public abstract class APSPMatrixMult
extends AllPairsShortestPaths

Abstract class that defines the extendShortestPaths method used by subclasses of AllPairsShortestPaths.


Constructor Summary
APSPMatrixMult()
           
 
Method Summary
protected  double[][] extendShortestPaths(double[][] l, double[][] w)
          Extends the shortest paths given in one matrix by the edge weights given in another matrix.
 
Methods inherited from class com.mhhe.clrs2e.AllPairsShortestPaths
computeShortestPaths, graphToMatrix, printMatrix, printMatrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APSPMatrixMult

public APSPMatrixMult()
Method Detail

extendShortestPaths

protected double[][] extendShortestPaths(double[][] l,
                                         double[][] w)
Extends the shortest paths given in one matrix by the edge weights given in another matrix.

Parameters:
l - Matrix of current shortest-path weights.
w - Matrix of edge weights.
Returns:
A matrix of shortest-path weights of the weights in l extended by the weights of the edges in w.