Updates the grid limits considering the solutions contained in a
<code>solutionList</code>.

@param solutionList The <code>solutionList</code> considered.
352443
private void updateLimits(List<S> solutionList) {
    for (int obj = 0; obj < numberOfObjectives; obj++) {
      gridLowerLimits[obj] = Double.MAX_VALUE;
      gridUpperLimits[obj] = Double.MIN_VALUE;
    }

    //Find the max and min limits of objetives into the population
    for (int ind = 0; ind < solutionList.size(); ind++) {
      Solution<?> tmpIndividual = solutionList.get(ind);
      for (int obj = 0; obj < numberOfObjectives; obj++) {
        if (tmpIndividual.getObjective(obj) < gridLowerLimits[obj]) {
          gridLowerLimits[obj] = tmpIndividual.getObjective(obj);
        }
        if (tmpIndividual.getObjective(obj) > gridUpperLimits[obj]) {
          gridUpperLimits[obj] = tmpIndividual.getObjective(obj);
        }
      }
    }
  }
907796
public static void setPasswordConstraintList (@Nonnull final IPasswordConstraintList aPasswordConstraintList)
  {
    ValueEnforcer.notNull (aPasswordConstraintList, "PasswordConstraintList");

    // Create a copy
    final IPasswordConstraintList aRealPasswordConstraints = aPasswordConstraintList.getClone ();
    s_aRWLock.writeLocked ( () -> {
      s_aPasswordConstraintList = aRealPasswordConstraints;
    });
    LOGGER.info ("Set global password constraints to " + aRealPasswordConstraints);
  }
1129445
public static <S extends Solution<?>> double averageDistanceToSolutionList(
          S solution,
          List<S> solutionList) {

    double sumOfDistances = 0.0;
    for (S sol : solutionList) {
      sumOfDistances += distanceBetweenObjectives(
              solution,
              sol);
    }

    return sumOfDistances / solutionList.size();
  }
455781
@Override
    synchronized public final void set(List<Map<Integer, Integer>> list) {
        this.clear();
        mappings.addAll(list);
    }
83325
public static <S extends Solution<?>> void nash(List<S> solutionsList) {
    nash(solutionsList, getNadirValues(solutionsList));
  }
303994
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList) {
    chebyshev(solutionsList, getIdealValues(solutionsList));
  }
1179853
public static <S> void restart(List<S> solutionList, Problem<S> problem,
                                 int percentageOfSolutionsToRemove) {
    if (solutionList == null) {
      throw new NullSolutionListException();
    } else if (problem == null) {
      throw new JMetalException("The problem is null");
    } else if ((percentageOfSolutionsToRemove < 0) || (percentageOfSolutionsToRemove > 100)) {
      throw new JMetalException("The percentage of solutions to remove is invalid: " + percentageOfSolutionsToRemove);
    }

    int solutionListOriginalSize = solutionList.size();
    int numberOfSolutionsToRemove = (int) (solutionListOriginalSize * percentageOfSolutionsToRemove / 100.0);

    removeSolutionsFromList(solutionList, numberOfSolutionsToRemove);
    fillPopulationWithNewSolutions(solutionList, problem, solutionListOriginalSize);
  }
1099590
public static <S> boolean solutionListsAreEquals(List<S> solutionList,
                                                   List<S> newSolutionList) {
    boolean found;
    for (int i = 0; i < solutionList.size(); i++) {

      int j = 0;
      found = false;
      while (j < newSolutionList.size()) {
        if (solutionList.get(i).equals(newSolutionList.get(j))) {
          found = true;
        }
        j++;
      }
      if (!found) {
        return false;
      }
    }
    return true;
  }
1251661
public void setSourceIdsList(java.util.Collection<String> sourceIdsList) {
        if (sourceIdsList == null) {
            this.sourceIdsList = null;
            return;
        }

        this.sourceIdsList = new java.util.ArrayList<String>(sourceIdsList);
    }
1225560
public static <S> int findIndexOfBestSolution(List<S> solutionList, Comparator<S> comparator) {
    if (solutionList == null) {
      throw new NullSolutionListException();
    } else if (solutionList.isEmpty()) {
      throw new EmptySolutionListException();
    } else if (comparator == null) {
      throw new JMetalException("The comparator is null");
    }

    int index = 0;
    S bestKnown = solutionList.get(0);
    S candidateSolution;

    int flag;
    for (int i = 1; i < solutionList.size(); i++) {
      candidateSolution = solutionList.get(i);
      flag = comparator.compare(bestKnown, candidateSolution);
      if (flag == 1) {
        index = i;
        bestKnown = candidateSolution;
      }
    }

    return index;
  }
1111096
@Override public Double evaluate(List<S> solutionList) {
    return spread(new ArrayFront(solutionList), referenceParetoFront);
  }
1205643
public S execute(List<S> solutionList) {
    if (null == solutionList) {
      throw new JMetalException("The solution list is null") ;
    } else if (solutionList.isEmpty()) {
      throw new JMetalException("The solution list is empty") ;
    }

    List<S> list = SolutionListUtils.selectNRandomDifferentSolutions(1, solutionList);

    return list.get(0) ;
  }
1083558
public void setPolicyList(java.util.Collection<PolicySummary> policyList) {
        if (policyList == null) {
            this.policyList = null;
            return;
        }

        this.policyList = new java.util.ArrayList<PolicySummary>(policyList);
    }
1029557
public void setCapabilityList(java.util.Collection<String> capabilityList) {
        if (capabilityList == null) {
            this.capabilityList = null;
            return;
        }

        this.capabilityList = new java.util.ArrayList<String>(capabilityList);
    }
666934
public void diffUpdate(List<T> newList) {
    if (getCollection().size() == 0) {
      addAll(newList);
      notifyDataSetChanged();
    } else {
      DiffCallback diffCallback = new DiffCallback(collection, newList);
      DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(diffCallback);
      clear();
      addAll(newList);
      diffResult.dispatchUpdatesTo(this);
    }
  }
1308366
public void setBackupPlanTemplatesList(java.util.Collection<BackupPlanTemplatesListMember> backupPlanTemplatesList) {
        if (backupPlanTemplatesList == null) {
            this.backupPlanTemplatesList = null;
            return;
        }

        this.backupPlanTemplatesList = new java.util.ArrayList<BackupPlanTemplatesListMember>(backupPlanTemplatesList);
    }
322032
public void setConnectionList(java.util.Collection<Connection> connectionList) {
        if (connectionList == null) {
            this.connectionList = null;
            return;
        }

        this.connectionList = new java.util.ArrayList<Connection>(connectionList);
    }