public void postProcessDistances(double distances[]){
  for (int i=0; i < distances.length; i++) {
    distances[i]=Math.sqrt(distances[i]);
  }
}

public void postProcessDistances ( double distances [ ] ) { for ( int i = 0 ; i < distances . length ; i ++ ) { distances [ i ] = Math . sqrt ( distances [ i ] ) ; } }
does post processing of the distances ( if necessary ) returned by distance ( distance ( instance first , instance second , double cutoffvalue ) . it is necessary to do so to get the correct distances if distance ( distance ( instance first , instance second , double cutoffvalue ) is used . this is because that function actually returns the squared distance to avoid inaccuracies arising from floating point comparison .
