
@Alias(value={"lp","minkowski","p","de.lmu.ifi.dbs.elki.distance.distancefunction.LPNormDistanceFunction"}) public class LPNormDistanceFunction extends AbstractSpatialNorm
NumberVectors.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
LPNormDistanceFunction.Parameterizer
Parameterization class. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected double | 
invp
p parameter and its inverse. 
 | 
protected double | 
p
p parameter and its inverse. 
 | 
| Constructor and Description | 
|---|
LPNormDistanceFunction(double p)
Constructor, internal version. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
double | 
distance(NumberVector v1,
        NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
 distance function. 
 | 
boolean | 
equals(Object obj)  | 
SimpleTypeInformation<? super NumberVector> | 
getInputTypeRestriction()
Get the input data type of the function. 
 | 
double | 
getP()
Get the functions p parameter. 
 | 
boolean | 
isMetric()
Is this distance function metric (in particular, does it satisfy the
 triangle equation?) 
 | 
double | 
minDist(SpatialComparable mbr1,
       SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
 function. 
 | 
double | 
norm(NumberVector v)
Compute the norm of object obj. 
 | 
private double | 
preDistance(NumberVector v1,
           NumberVector v2,
           int start,
           int end,
           double agg)
Compute unscaled distance in a range of dimensions. 
 | 
private double | 
preDistanceMBR(SpatialComparable mbr1,
              SpatialComparable mbr2,
              int start,
              int end,
              double agg)
Compute unscaled distance in a range of dimensions. 
 | 
private double | 
preDistanceVM(NumberVector v,
             SpatialComparable mbr,
             int start,
             int end,
             double agg)
Compute unscaled distance in a range of dimensions. 
 | 
private double | 
preNorm(NumberVector v,
       int start,
       int end,
       double agg)
Compute unscaled norm in a range of dimensions. 
 | 
private double | 
preNormMBR(SpatialComparable mbr,
          int start,
          int end,
          double agg)
Compute unscaled norm in a range of dimensions. 
 | 
String | 
toString()  | 
instantiatedimensionality, dimensionality, dimensionality, dimensionalityisSymmetricclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisSymmetricprotected double p
protected double invp
public LPNormDistanceFunction(double p)
p - Parameter pprivate final double preDistance(NumberVector v1, NumberVector v2, int start, int end, double agg)
v1 - First objectv2 - Second objectstart - First dimensionend - Exclusive last dimensionagg - Current aggregate valueprivate final double preDistanceVM(NumberVector v, SpatialComparable mbr, int start, int end, double agg)
v - First vectormbr - Second MBRstart - First dimensionend - Exclusive last dimensionagg - Current aggregate valueprivate final double preDistanceMBR(SpatialComparable mbr1, SpatialComparable mbr2, int start, int end, double agg)
mbr1 - First MBRmbr2 - Second MBRstart - First dimensionend - Exclusive last dimensionagg - Current aggregate valueprivate final double preNorm(NumberVector v, int start, int end, double agg)
v - Data objectstart - First dimensionend - Exclusive last dimensionagg - Current aggregate valueprivate final double preNormMBR(SpatialComparable mbr, int start, int end, double agg)
mbr - Data objectstart - First dimensionend - Exclusive last dimensionagg - Current aggregate valuepublic double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunctiondistance in interface NumberVectorDistanceFunction<NumberVector>distance in interface PrimitiveDistanceFunction<NumberVector>distance in class AbstractPrimitiveDistanceFunction<NumberVector>v1 - first DatabaseObjectv2 - second DatabaseObjectpublic double norm(NumberVector v)
Normv - Objectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctionmbr1 - the first MBR objectmbr2 - the second MBR objectpublic boolean isMetric()
DistanceFunctionisMetric in interface DistanceFunction<NumberVector>isMetric in class AbstractPrimitiveDistanceFunction<NumberVector>true when metric.public double getP()
public SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector>getInputTypeRestriction in class AbstractNumberVectorDistanceFunctionCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.