cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/allocationpolicies/power/PowerVmAllocationPolicyMigrationMedianAbsoluteDeviation.java
@Override
    public double computeHostUtilizationMeasure(PowerHostUtilizationHistory host) throws IllegalArgumentException {
        final double[] data = host.getUtilizationHistory();
        if (MathUtil.countNonZeroBeginning(data) >= MIN_NUM_OF_HISTORY_ENTRIES_TO_COMPUTE_MAD) {
            return MathUtil.mad(data);
        }

        throw new IllegalArgumentException("There is not enough Host history to compute Host utilization MAD");
    }
/**
     * Computes the host utilization MAD used for generating the host over utilization threshold.
     *
     * @param host the host
     * @return the host utilization MAD
     * @throws {@inheritDoc}
     */
Computes the host utilization MAD used for generating the host over utilization threshold.
@param host the host
@return the host utilization MAD
@throws
Computes the host utilization MAD used for generating the host over utilization threshold . @param host the host @return the host utilization MAD @throws
@Override
    public double computeHostUtilizationMeasure(PowerHostUtilizationHistory host) throws IllegalArgumentException {
        final double[] data = host.getUtilizationHistory();
        if (MathUtil.countNonZeroBeginning(data) >= MIN_NUM_OF_HISTORY_ENTRIES_TO_COMPUTE_MAD) {
            return MathUtil.mad(data);
        }
        throw new IllegalArgumentException("There is not enough Host history to compute Host utilization MAD");
    }
@ Override public double computeHostUtilizationMeasure ( PowerHostUtilizationHistory host ) throws IllegalArgumentException { final double [ ] data = host . getUtilizationHistory ( ) ; if ( MathUtil . countNonZeroBeginning ( data ) >= MIN_NUM_OF_HISTORY_ENTRIES_TO_COMPUTE_MAD ) { return MathUtil . mad ( data ) ; } throw new IllegalArgumentException ( "There is not enough Host history to compute Host utilization MAD" ) ; }
Computes the host utilization MAD used for generating the host over utilization threshold.
Computes the host utilization MAD used for generating the host over utilization threshold .