示例#1
0
 /** Evaluates the fitness for all unprocessed individuals within the population. */
 public void evaluatePostponedFitness() {
   for (I individual : uncalculated) {
     fitnessMapping.put(individual, fitnessFunction.calculateFitness(individual, this));
   }
   initialPhase = false;
 }
示例#2
0
 /**
  * Inserts an individual into the population.
  *
  * @param individual individual to insert
  */
 public void insertIndividual(I individual) {
   individuals.add(individual);
   fitnessMapping.put(individual, fitnessFunction.calculateFitness(individual, this));
 }