protected void calculateFitnessAndSortPopulation(){
  logger.debug("Calculating fitness for " + population.size() + " individuals");
  Iterator<T> iterator=population.iterator();
  while (iterator.hasNext()) {
    T c=iterator.next();
    if (isFinished()) {
      if (c.isChanged())       iterator.remove();
    }
 else {
      for (      FitnessFunction<T> fitnessFunction : fitnessFunctions) {
        fitnessFunction.getFitness(c);
        notifyEvaluation(c);
      }
    }
  }
  sortPopulation();
}

protected void calculateFitnessAndSortPopulation ( ) { logger . debug ( "Calculating fitness for " + population . size ( ) + " individuals" ) ; Iterator < T > iterator = population . iterator ( ) ; while ( iterator . hasNext ( ) ) { T c = iterator . next ( ) ; if ( isFinished ( ) ) { if ( c . isChanged ( ) ) iterator . remove ( ) ; } else { for ( FitnessFunction < T > fitnessFunction : fitnessFunctions ) { fitnessFunction . getFitness ( c ) ; notifyEvaluation ( c ) ; } } } sortPopulation ( ) ; }
calculate fitness for all individuals
