/** * Returns the Euclidean distance between two points. It is used to compute the similarity degree * of these ones. * * @param x the first point * @param y the second point * @return the Euclidean distance between the points */ protected static double distnorm2(DoubleMatrix1D x, DoubleMatrix1D y) { DoubleMatrix1D z = x.copy(); z.assign(y, Functions.minus); return z.zDotProduct(z); }