cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/network/FloydWarshall.java
private void savePreviousDelays(double[][] originalDelayMatrix) {
        for(final int i: vertices) {
            for(final int j: vertices) {
                dk_minus_one[i][j] = Double.MAX_VALUE;
                pk_minus_one[i][j] = -1;
                if (originalDelayMatrix[i][j] != 0) {
                    dk_minus_one[i][j] = originalDelayMatrix[i][j];
                    pk_minus_one[i][j] = i;
                }
                // NOTE: we have set the value to infinity and will exploit this to avoid a comparison.
            }
        }
    }
/**
     * Saves the delay matrix before updating.
     *
     * @param originalDelayMatrix the original delay matrix
     */
Saves the delay matrix before updating.
@param originalDelayMatrix the original delay matrix
Saves the delay matrix before updating . @param originalDelayMatrix the original delay matrix
private void savePreviousDelays(double[][] originalDelayMatrix) {
        for(final int i: vertices) {
            for(final int j: vertices) {
                dk_minus_one[i][j] = Double.MAX_VALUE;
                pk_minus_one[i][j] = -1;
                if (originalDelayMatrix[i][j] != 0) {
                    dk_minus_one[i][j] = originalDelayMatrix[i][j];
                    pk_minus_one[i][j] = i;
                }
            }
        }
    }
private void savePreviousDelays ( double [ ] [ ] originalDelayMatrix ) { for ( final int i : vertices ) { for ( final int j : vertices ) { dk_minus_one [ i ] [ j ] = Double . MAX_VALUE ; pk_minus_one [ i ] [ j ] = - 1 ; if ( originalDelayMatrix [ i ] [ j ] != 0 ) { dk_minus_one [ i ] [ j ] = originalDelayMatrix [ i ] [ j ] ; pk_minus_one [ i ] [ j ] = i ; } } } }
Saves the delay matrix before updating.
Saves the delay matrix before updating .
// NOTE: we have set the value to infinity and will exploit this to avoid a comparison.