code: public final double distance(final double[] value1, final double[] value2) {
          double agg = 0;
          for (int i = 0; i < value1.length; i++) {
              agg += (value1[i] - value2[i]) * (value1[i] - value2[i]);
          }
          return Math.sqrt(agg);
      }
docs: Compute traditional Euclidean distance.
  @param value1
  @param value2
  @return