private static double distance(Problem problem,Solution a,Solution b,double power){
  double distance=0.0;
  for (int i=0; i < problem.getNumberOfObjectives(); i++) {
    distance+=Math.pow(Math.abs(a.getObjective(i) - b.getObjective(i)),power);
  }
  return Math.pow(distance,1.0 / power);
}

private static double distance ( Problem problem , Solution a , Solution b , double power ) { double distance = 0.0 ; for ( int i = 0 ; i < problem . getNumberOfObjectives ( ) ; i ++ ) { distance += Math . pow ( Math . abs ( a . getObjective ( i ) - b . getObjective ( i ) ) , power ) ; } return Math . pow ( distance , 1.0 / power ) ; }
returns the distance in objective space between the two solutions .
