public class EuclideanDistanceMeasure extends SquaredEuclideanDistanceMeasure
SquaredEuclideanDistanceMeasure, will be faster since it doesn't do the actual square root of the
squared differences.Parametered.ParameteredGeneralizationslog| Constructor and Description |
|---|
EuclideanDistanceMeasure() |
| Modifier and Type | Method and Description |
|---|---|
double |
distance(double centroidLengthSquare,
Vector centroid,
Vector v)
Optimized version of distance metric for sparse vectors.
|
double |
distance(Vector v1,
Vector v2)
Returns the distance metric applied to the arguments
|
configure, createParameters, getParameterspublic double distance(Vector v1, Vector v2)
DistanceMeasuredistance in interface DistanceMeasuredistance in class SquaredEuclideanDistanceMeasurev1 - a Vector defining a multidimensional point in some feature spacev2 - a Vector defining a multidimensional point in some feature spacepublic double distance(double centroidLengthSquare,
Vector centroid,
Vector v)
DistanceMeasuredistance in interface DistanceMeasuredistance in class SquaredEuclideanDistanceMeasurecentroidLengthSquare - Square of the length of centroidcentroid - Centroid vectorCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.