
public class WeightedLPNormDistanceFunction extends LPNormDistanceFunction implements WeightedNumberVectorDistanceFunction<NumberVector>
NumberVector.| Modifier and Type | Class and Description |
|---|---|
static class |
WeightedLPNormDistanceFunction.Parameterizer
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
weights
Weight array
|
invp, pWEIGHTS_ID| Constructor and Description |
|---|
WeightedLPNormDistanceFunction(double p,
double[] weights)
Constructor.
|
| 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 |
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) |
private double |
preDistanceMBR(SpatialComparable mbr1,
SpatialComparable mbr2,
int start,
int end,
double agg) |
private double |
preDistanceVM(NumberVector v,
SpatialComparable mbr,
int start,
int end,
double agg) |
private double |
preNorm(NumberVector v,
int start,
int end,
double agg) |
private double |
preNormMBR(SpatialComparable mbr,
int start,
int end,
double agg) |
getP, isMetric, toStringinstantiatedimensionality, dimensionality, dimensionality, dimensionalityisSymmetricclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinstantiate, isMetric, isSymmetricpublic WeightedLPNormDistanceFunction(double p,
double[] weights)
p - p valueweights - Weight vectorprivate final double preDistance(NumberVector v1, NumberVector v2, int start, int end, double agg)
private final double preDistanceVM(NumberVector v, SpatialComparable mbr, int start, int end, double agg)
private final double preDistanceMBR(SpatialComparable mbr1, SpatialComparable mbr2, int start, int end, double agg)
private final double preNorm(NumberVector v, int start, int end, double agg)
private final double preNormMBR(SpatialComparable mbr, int start, int end, double agg)
public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunctiondistance in interface NumberVectorDistanceFunction<NumberVector>distance in interface PrimitiveDistanceFunction<NumberVector>distance in class LPNormDistanceFunctionv1 - first DatabaseObjectv2 - second DatabaseObjectpublic double norm(NumberVector v)
Normnorm in interface Norm<NumberVector>norm in class LPNormDistanceFunctionv - Objectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctionminDist in interface SpatialPrimitiveDistanceFunction<NumberVector>minDist in class LPNormDistanceFunctionmbr1 - the first MBR objectmbr2 - the second MBR objectpublic boolean equals(Object obj)
equals in class LPNormDistanceFunctionpublic SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector>getInputTypeRestriction in class LPNormDistanceFunctionCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.