
@Alias(value="de.lmu.ifi.dbs.elki.distance.distancefunction.WeightedSquaredEuclideanDistanceFunction") public class WeightedSquaredEuclideanDistanceFunction extends AbstractSpatialNorm implements WeightedNumberVectorDistanceFunction<NumberVector>
NumberVectors. This results in the
 same rankings as Euclidean distance, but saves computing the square root.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
WeightedSquaredEuclideanDistanceFunction.Parameterizer
Parameterization class. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected double[] | 
weights
Weight array 
 | 
WEIGHTS_ID| Constructor and Description | 
|---|
WeightedSquaredEuclideanDistanceFunction(double[] weights)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
double | 
distance(NumberVector v1,
        NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
 distance function. 
 | 
boolean | 
equals(Object obj)  | 
boolean | 
isMetric()
Is this distance function metric (in particular, does it satisfy the
 triangle equation?) 
 | 
double | 
minDist(SpatialComparable mbr1,
       SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
 function. 
 | 
double | 
norm(NumberVector obj)
Compute the norm of object obj. 
 | 
instantiatedimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestrictionisSymmetricclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputTypeRestrictioninstantiate, isSymmetricpublic WeightedSquaredEuclideanDistanceFunction(double[] weights)
weights - Weight vectorpublic double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunctiondistance in interface NumberVectorDistanceFunction<NumberVector>distance in interface PrimitiveDistanceFunction<NumberVector>distance in class AbstractPrimitiveDistanceFunction<NumberVector>v1 - first DatabaseObjectv2 - second DatabaseObjectpublic double norm(NumberVector obj)
Normnorm in interface Norm<NumberVector>obj - Objectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctionminDist in interface SpatialPrimitiveDistanceFunction<NumberVector>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic boolean isMetric()
DistanceFunctionisMetric in interface DistanceFunction<NumberVector>isMetric in class AbstractPrimitiveDistanceFunction<NumberVector>true when metric.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.