code: protected static double distanceSq(double[] a, double[] b) {
  		double sum = 0;
  		for (int i = 0; i < a.length; i++) {
  			double d = a[i]-b[i];
  			sum += d*d;
  		}
  		return sum;
  	}
docs: Returns the euclidean distance squared between the two poits