public class WeightedEuclideanDistanceMeasure extends WeightedDistanceMeasure
Parametered.ParameteredGeneralizations
log
Constructor and Description |
---|
WeightedEuclideanDistanceMeasure() |
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 p1,
Vector p2)
Returns the distance metric applied to the arguments
|
configure, createParameters, getParameters, getWeights, setWeights
public double distance(Vector p1, Vector p2)
DistanceMeasure
p1
- a Vector defining a multidimensional point in some feature spacep2
- a Vector defining a multidimensional point in some feature spacepublic double distance(double centroidLengthSquare, Vector centroid, Vector v)
DistanceMeasure
centroidLengthSquare
- Square of the length of centroidcentroid
- Centroid vectorCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.