class EuclideanDistance extends FastDistance {

    @Override
    public double calc(double[] array1, double[] array2) {
        double s = 0.;
        for (int i = 0; i < array1.length; i++) {
            double d = array1[i] - array2[i];
            s += d * d;
        }
        return Math.sqrt(s);
    }

}