private Solution largestObjectiveValue(int objective,Population population){
  Solution largest=null;
  double value=Double.NEGATIVE_INFINITY;
  for (  Solution solution : population) {
    if (solution.getObjective(objective) > value) {
      largest=solution;
      value=solution.getObjective(objective);
    }
  }
  return largest;
}

private Solution largestObjectiveValue ( int objective , Population population ) { Solution largest = null ; double value = Double . NEGATIVE_INFINITY ; for ( Solution solution : population ) { if ( solution . getObjective ( objective ) > value ) { largest = solution ; value = solution . getObjective ( objective ) ; } } return largest ; }
returns the solution with the largest objective value for the given objective .
