@Override public void operate(Population pop) throws Exception {
  List<Individual> newIndividuals=new LinkedList<Individual>();
  for (int i=0; i < pop.getNumberOfIndividuals(); i++) {
    List<Individual> individuals=operate(pop.get(i));
    newIndividuals.addAll(individuals);
  }
  pop.clear();
  pop.addAllIndividuals(newIndividuals);
}

@ Override public void operate ( Population pop ) throws Exception { List < Individual > newIndividuals = new LinkedList < Individual > ( ) ; for ( int i = 0 ; i < pop . getNumberOfIndividuals ( ) ; i ++ ) { List < Individual > individuals = operate ( pop . get ( i ) ) ; newIndividuals . addAll ( individuals ) ; } pop . clear ( ) ; pop . addAllIndividuals ( newIndividuals ) ; }
operates on all individuals , removes the original individuals and adds the new ones .
