/** 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; }
/** * 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)); }