public static double distanceBetweenSolutionsInObjectiveSpace ( DoubleSolution solutionI , DoubleSolution solutionJ ) { double distance = 0.0 ; double diff ; for ( int i = 0 ; i < solutionI . getNumberOfVariables ( ) ; i ++ ) { diff = solutionI . getVariableValue ( i ) - solutionJ . getVariableValue ( i ) ; distance += Math . pow ( diff , 2.0 ) ; } return Math . sqrt ( distance ) ; }
Returns the distance between two solutions in the search space .