class VmsDispersionAlgorithmForHomogeneousEnvironment extends ConsolidationScoredPreferenceForSmallHosts {

    @Override
    public Map<Long, HostResources> mapVMsToHost(List<HostResources> rankedHosts) {
        if (MathUtils.equals(standardDeviationHostsUsage, 0)) {
            return new HashMap<>();
        }
        List<HostResources> rankedHostsStdVms = cloneListOfHosts(rankedHosts);
        List<HostResources> rankedHostsStdHosts = cloneListOfHosts(rankedHosts);
        List<HostResources> rankedHostsStdAverage = cloneListOfHosts(rankedHosts);

        logger.debug("Simulating migration mapping with VMs resource standard deviation");
        Map<Long, HostResources> vmsToHostStdVms = simulateVmsMigrations(rankedHostsStdVms, standardDeviationVmsConfiguration);

        logger.debug("Simulating migration mapping with hosts resource standard deviation");
        Map<Long, HostResources> vmsToHostStdHosts = simulateVmsMigrations(rankedHostsStdHosts, standardDeviationHostsUsage);

        logger.debug("Simulating migration mapping with the average of hosts resource and VMs resource standard deviation");
        Map<Long, HostResources> vmsToHostStdAverage = simulateVmsMigrations(rankedHostsStdAverage, standardDeviationAverage);

        double usedMemoryHostsWithStdVms[] = new double[rankedHosts.size()];
        for (int i = 0; i < rankedHostsStdVms.size(); i++) {
            usedMemoryHostsWithStdVms[i] = rankedHostsStdVms.get(i).getUsedMemoryInMegaBytes();
        }
        double stdWithStdVms = std.evaluate(usedMemoryHostsWithStdVms);
        logger.debug(String.format("The Std. achieved using the VMs resource standard deviation as parameter for the simulation was [%f]", stdWithStdVms));
        double usedMemoryHostsWithStdHost[] = new double[rankedHosts.size()];
        for (int i = 0; i < rankedHostsStdHosts.size(); i++) {
            usedMemoryHostsWithStdHost[i] = rankedHostsStdHosts.get(i).getUsedMemoryInMegaBytes();
        }
        double stdWithStdHosts = std.evaluate(usedMemoryHostsWithStdHost);
        logger.debug(String.format("The Std. achieved using the hosts resource standard deviation as parameter for the simulation was [%f]", stdWithStdHosts));

        double usedMemoryHostsWithStdAverage[] = new double[rankedHosts.size()];
        for (int i = 0; i < rankedHostsStdAverage.size(); i++) {
            usedMemoryHostsWithStdAverage[i] = rankedHostsStdAverage.get(i).getUsedMemoryInMegaBytes();
        }
        double stdWithStdAverage = std.evaluate(usedMemoryHostsWithStdAverage);
        logger.debug(String.format("The Std. achieved using the average between hosts resource and VMs resource standard deviation as parameter for the simulation was [%f]",
                stdWithStdAverage));

        if (stdWithStdAverage <= stdWithStdHosts && stdWithStdAverage <= stdWithStdVms) {
            logger.debug("The simulation that won the competition was the one executed with alpha as the average of host resource and VMs resource standard deviation.");
            logger.debug(String.format("The number of migrations that will be executed is[%d].", vmsToHostStdAverage.size()));
            return vmsToHostStdAverage;
        }
        if (stdWithStdHosts <= stdWithStdVms) {
            logger.debug("The simulation that won the competition was the one executed with alpha as the host resource standard deviation.");
            logger.debug(String.format("The number of migrations that will be executed is[%d].", vmsToHostStdHosts.size()));
            return vmsToHostStdHosts;
        }
        logger.debug("The simulation that won the competition was the one executed with alpha as the VMs resource standard deviation.");
        logger.debug(String.format("The number of migrations that will be executed is[%d].", vmsToHostStdVms.size()));
        return vmsToHostStdVms;
    }

    public  VmsDispersionAlgorithmForHomogeneousEnvironment();

}