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.
|
boolean |
equals(Object obj) |
getP, isMetric, toString
distance, getDistanceFactory, getInputTypeRestriction
instantiate, isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
instantiate, 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 boolean equals(Object obj)
equals
in class LPNormDistanceFunction