protected double distance(Solution s1,Solution s2){
  double distance=0.0;
  for (int i=0; i < s1.getNumberOfObjectives(); i++) {
    distance+=Math.pow(s1.getObjective(i) - s2.getObjective(i),2.0);
  }
  return Math.sqrt(distance);
}

protected double distance ( Solution s1 , Solution s2 ) { double distance = 0.0 ; for ( int i = 0 ; i < s1 . getNumberOfObjectives ( ) ; i ++ ) { distance += Math . pow ( s1 . getObjective ( i ) - s2 . getObjective ( i ) , 2.0 ) ; } return Math . sqrt ( distance ) ; }
returns the euclidean distance between two solutions in objective space .
