weibozhao commented on a change in pull request #24: URL: https://github.com/apache/flink-ml/pull/24#discussion_r752903128
########## File path: flink-ml-lib/src/main/java/org/apache/flink/ml/classification/knn/distance/EuclideanDistance.java ########## @@ -0,0 +1,259 @@ +package org.apache.flink.ml.classification.knn.distance; + +import org.apache.flink.ml.common.linalg.BLAS; +import org.apache.flink.ml.common.linalg.DenseMatrix; +import org.apache.flink.ml.common.linalg.DenseVector; +import org.apache.flink.ml.common.linalg.MatVecOp; +import org.apache.flink.ml.common.linalg.SparseVector; +import org.apache.flink.ml.common.linalg.Vector; +import org.apache.flink.util.Preconditions; + +import java.util.Arrays; + +/** + * Euclidean distance is the "ordinary" straight-line distance between two points in Euclidean + * space. + * + * <p>https://en.wikipedia.org/wiki/Euclidean_distance + * + * <p>Given two vectors a and b, Euclidean Distance = ||a - b||, where ||*|| means the L2 norm of + * the vector. + */ +public class EuclideanDistance extends BaseFastDistance { Review comment: yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org