cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/util/MathUtil.java
public static double mad(final double... data) {
        if (data.length == 0) {
            return 0;
        }

        final double median = median(data);
        final double[] deviationSum = new double[data.length];
        for (int i = 0; i < data.length; i++) {
            deviationSum[i] = Math.abs(median - data[i]);
        }

        return median(deviationSum);
    }
/**
     * Gets the Median absolute deviation (MAD) from a array of numbers.
     *
     * @param data the array of numbers
     * @return the mad
     */
Gets the Median absolute deviation (MAD) from a array of numbers.
@param data the array of numbers
@return the mad
Gets the Median absolute deviation ( MAD ) from a array of numbers . @param data the array of numbers @return the mad
public static double mad(final double... data) {
        if (data.length == 0) {
            return 0;
        }
        final double median = median(data);
        final double[] deviationSum = new double[data.length];
        for (int i = 0; i < data.length; i++) {
            deviationSum[i] = Math.abs(median - data[i]);
        }
        return median(deviationSum);
    }
public static double mad ( final double ... data ) { if ( data . length == 0 ) { return 0 ; } final double median = median ( data ) ; final double [ ] deviationSum = new double [ data . length ] ; for ( int i = 0 ; i < data . length ; i ++ ) { deviationSum [ i ] = Math . abs ( median - data [ i ] ) ; } return median ( deviationSum ) ; }
Gets the Median absolute deviation (MAD) from a array of numbers.
Gets the Median absolute deviation ( MAD ) from a array of numbers .