public class WeightedLPNormDistanceFunction extends LPNormDistanceFunction
LPNormDistanceFunction.Parameterizer
Modifier and Type | Field and Description |
---|---|
protected double[] |
weights
Weight array
|
P_ID
Constructor and Description |
---|
WeightedLPNormDistanceFunction(double p,
double[] weights)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleDistance(NumberVector<?> v1,
NumberVector<?> v2)
Returns the distance between the specified FeatureVectors as a LP-Norm for
the currently set p.
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this
distance function.
|
boolean |
equals(Object obj) |
doubleNorm, getP, instantiate, isMetric, minDist, toString
norm
distance, getDistanceFactory, getInputTypeRestriction
isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
distance, getInputTypeRestriction
getDistanceFactory, isSymmetric
public WeightedLPNormDistanceFunction(double p, double[] weights)
p
- p valueweights
- Weight vectorpublic double doubleDistance(NumberVector<?> v1, NumberVector<?> v2)
LPNormDistanceFunction
doubleDistance
in interface PrimitiveDoubleDistanceFunction<NumberVector<?>>
doubleDistance
in class LPNormDistanceFunction
v1
- first FeatureVectorv2
- second FeatureVectorpublic double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleMinDist
in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?>>
doubleMinDist
in class LPNormDistanceFunction
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic boolean equals(Object obj)
equals
in class LPNormDistanceFunction