cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-testbeds/src/main/java/org/cloudsimplus/testbeds/ExperimentRunner.java
protected List<Double> computeAntitheticMeans(List<Double> samples) {
        if (!isApplyAntitheticVariatesTechnique()) {
            return samples;
        }

        final int half = samples.size() / 2;
        final List<Double> antitheticMeans = new ArrayList<>(half);
        //applies the "Antithetic Variates Technique" to reduce variance
        for (int i = 0; i < half; i++) {
            antitheticMeans.add((samples.get(i) + samples.get(half + i)) / 2.0);
        }

        System.out.printf(
                "\tAntithetic Variates Technique applied. The number of samples was reduced to the half (%d).\n", half);

        return antitheticMeans;
    }
/**
     * <p>
     * Computes the antithetic means for the given samples if the
     * {@link #isApplyAntitheticVariatesTechnique() "Antithetic Variates Technique" is to be applied}.
     *
     * These values are the mean between the first half of samples with the
     * second half. By this way, the resulting value is an array with half of
     * the samples length.
     * </p>
     *
     * <p>
     * <b>NOTE:</b> To correctly compute the antithetic values the seeds from
     * the first half of experiments must be used for the second half.</p>
     *
     * @param samples the list of samples to compute the antithetic means from
     * @return the computed antithetic means from the given samples if the
     * "Antithetic Variates Technique" is to be applied, otherwise return the
     * same given samples list.
     *
     * @see #createRandomGen(int, double, double)
     */

Computes the antithetic means for the given samples if the
#isApplyAntitheticVariatesTechnique() "Antithetic Variates Technique" is to be applied.

These values are the mean between the first half of samples with the
second half. By this way, the resulting value is an array with half of
the samples length.


NOTE: To correctly compute the antithetic values the seeds from
the first half of experiments must be used for the second half.

@param samples the list of samples to compute the antithetic means from
@return the computed antithetic means from the given samples if the
"Antithetic Variates Technique" is to be applied, otherwise return the
same given samples list.


Computes the antithetic means for the given samples if the #isApplyAntitheticVariatesTechnique () " Antithetic Variates Technique " is to be applied . These values are the mean between the first half of samples with the second half . By this way the resulting value is an array with half of the samples length . NOTE : To correctly compute the antithetic values the seeds from the first half of experiments must be used for the second half . @param samples the list of samples to compute the antithetic means from @return the computed antithetic means from the given samples if the " Antithetic Variates Technique " is to be applied otherwise return the same given samples list .
protected List<Double> computeAntitheticMeans(List<Double> samples) {
        if (!isApplyAntitheticVariatesTechnique()) {
            return samples;
        }
        final int half = samples.size() / 2;
        final List<Double> antitheticMeans = new ArrayList<>(half);
        for (int i = 0; i < half; i++) {
            antitheticMeans.add((samples.get(i) + samples.get(half + i)) / 2.0);
        }
        System.out.printf(
                "\tAntithetic Variates Technique applied. The number of samples was reduced to the half (%d).\n", half);
        return antitheticMeans;
    }
protected List < Double > computeAntitheticMeans ( List < Double > samples ) { if ( ! isApplyAntitheticVariatesTechnique ( ) ) { return samples ; } final int half = samples . size ( ) / 2 ; final List < Double > antitheticMeans = new ArrayList < > ( half ) ; for ( int i = 0 ; i < half ; i ++ ) { antitheticMeans . add ( ( samples . get ( i ) + samples . get ( half + i ) ) / 2.0 ) ; } System . out . printf ( "\tAntithetic Variates Technique applied. The number of samples was reduced to the half (%d).\n" , half ) ; return antitheticMeans ; }
<p>
 Computes the antithetic means for the given samples if the
 {@link #isApplyAntitheticVariatesTechnique() "Antithetic Variates Technique" is to be applied}.
<p > Computes the antithetic means for the given samples if the { @link #isApplyAntitheticVariatesTechnique () " Antithetic Variates Technique " is to be applied } .
//applies the "Antithetic Variates Technique" to reduce variance