static double evaluate(Problem problem,NondominatedPopulation approximationSet){
  boolean isInverted=true;
  boolean isCustomHypervolume=(Settings.getHypervolume() != null) && (problem.getNumberOfObjectives() > 2);
  if (isCustomHypervolume) {
    isInverted=Settings.isHypervolumeInverted();
  }
  List<Solution> solutions=new ArrayList<Solution>();
  for (  Solution solution : approximationSet) {
    for (int i=0; i < solution.getNumberOfObjectives(); i++) {
      if (solution.getObjective(i) > 1.0) {
        continue;
      }
    }
    Solution clone=solution.copy();
    if (isInverted) {
      invert(problem,clone);
    }
    solutions.add(clone);
  }
  if (isCustomHypervolume) {
    return invokeNativeHypervolume(problem,solutions,isInverted);
  }
 else {
    return calculateHypervolume(solutions,solutions.size(),problem.getNumberOfObjectives());
  }
}

static double evaluate ( Problem problem , NondominatedPopulation approximationSet ) { boolean isInverted = true ; boolean isCustomHypervolume = ( Settings . getHypervolume ( ) != null ) && ( problem . getNumberOfObjectives ( ) > 2 ) ; if ( isCustomHypervolume ) { isInverted = Settings . isHypervolumeInverted ( ) ; } List < Solution > solutions = new ArrayList < Solution > ( ) ; for ( Solution solution : approximationSet ) { for ( int i = 0 ; i < solution . getNumberOfObjectives ( ) ; i ++ ) { if ( solution . getObjective ( i ) > 1.0 ) { continue ; } } Solution clone = solution . copy ( ) ; if ( isInverted ) { invert ( problem , clone ) ; } solutions . add ( clone ) ; } if ( isCustomHypervolume ) { return invokeNativeHypervolume ( problem , solutions , isInverted ) ; } else { return calculateHypervolume ( solutions , solutions . size ( ) , problem . getNumberOfObjectives ( ) ) ; } }
computes the hypervolume of the normalized approximation set .
