question: public void postProcessDistances ( double distances [ ] ) { for ( int i = 0 ; i < distances . length ; i ++ ) { distances [ i ] = Math . sqrt ( distances [ i ] ) ; } }
target:  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.