
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, toStringdistance, getDistanceFactory, getInputTypeRestrictioninstantiate, isSymmetricclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinstantiate, isSymmetricpublic WeightedLPNormDistanceFunction(double p,
double[] weights)
p - p valueweights - Weight vectorpublic double doubleDistance(NumberVector<?,?> v1, NumberVector<?,?> v2)
LPNormDistanceFunctiondoubleDistance in interface PrimitiveDoubleDistanceFunction<NumberVector<?,?>>doubleDistance in class LPNormDistanceFunctionv1 - first FeatureVectorv2 - second FeatureVectorpublic boolean equals(Object obj)
equals in class LPNormDistanceFunction