public class WeightedSquaredEuclideanDistanceFunction extends AbstractSpatialDoubleDistanceNorm
Modifier and Type | Field and Description |
---|---|
protected double[] |
weights
Weight array
|
Constructor and Description |
---|
WeightedSquaredEuclideanDistanceFunction(double[] weights)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleDistance(NumberVector<?> v1,
NumberVector<?> v2)
Provides the squared Euclidean distance between the given two vectors.
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this
distance function.
|
double |
doubleNorm(NumberVector<?> obj)
Compute the norm of object obj as double value.
|
boolean |
equals(Object obj) |
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the
triangle equation?)
|
instantiate, minDist
norm
dimensionality, dimensionality, dimensionality, dimensionality, distance, getDistanceFactory, getInputTypeRestriction
isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, getInputTypeRestriction
getDistanceFactory, isSymmetric
public WeightedSquaredEuclideanDistanceFunction(double[] weights)
weights
- public double doubleDistance(NumberVector<?> v1, NumberVector<?> v2)
v1
- first Objectv2
- second Objectpublic double doubleNorm(NumberVector<?> obj)
DoubleNorm
obj
- Objectpublic double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
isMetric
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
true
when metric.