|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance> de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction de.lmu.ifi.dbs.elki.distance.distancefunction.LPNormDistanceFunction
public class LPNormDistanceFunction
Provides a LP-Norm for FeatureVectors.
Nested Class Summary | |
---|---|
static class |
LPNormDistanceFunction.Parameterizer
Parameterization class. |
Field Summary | |
---|---|
private double |
p
Keeps the currently set p. |
static OptionID |
P_ID
OptionID for the "p" parameter |
Constructor Summary | |
---|---|
LPNormDistanceFunction(double p)
Constructor, internal version. |
Method Summary | |
---|---|
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)
|
double |
getP()
Get the functions p parameter. |
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the triangle equation?) |
String |
toString()
|
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction |
---|
distance, getDistanceFactory, getInputTypeRestriction |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction |
---|
instantiate, isSymmetric |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction |
---|
instantiate, isSymmetric |
Field Detail |
---|
public static final OptionID P_ID
private double p
Constructor Detail |
---|
public LPNormDistanceFunction(double p)
p
- Parameter pMethod Detail |
---|
public double doubleDistance(NumberVector<?,?> v1, NumberVector<?,?> v2)
v1
- first FeatureVectorv2
- second FeatureVector
public double getP()
public boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
isMetric
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
true
when metric.public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |