public class SparseLPNormDistanceFunction extends AbstractPrimitiveDistanceFunction<SparseNumberVector> implements Norm<SparseNumberVector>
SparseNumberVector
s.Modifier and Type | Class and Description |
---|---|
static class |
SparseLPNormDistanceFunction.Parameterizer
Parameterizer
|
Modifier and Type | Field and Description |
---|---|
private double |
invp
P parameter and its inverse.
|
private double |
p
P parameter and its inverse.
|
Constructor and Description |
---|
SparseLPNormDistanceFunction(double p)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(SparseNumberVector v1,
SparseNumberVector v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
SimpleTypeInformation<? super SparseNumberVector> |
getInputTypeRestriction()
Get the input data type of the function.
|
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the
triangle equation?)
|
double |
norm(SparseNumberVector v1)
Compute the norm of object obj.
|
instantiate, isSymmetric
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
instantiate, isSymmetric
private double p
private double invp
public SparseLPNormDistanceFunction(double p)
public double distance(SparseNumberVector v1, SparseNumberVector v2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<SparseNumberVector>
distance
in class AbstractPrimitiveDistanceFunction<SparseNumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double norm(SparseNumberVector v1)
Norm
norm
in interface Norm<SparseNumberVector>
v1
- Objectpublic SimpleTypeInformation<? super SparseNumberVector> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<SparseNumberVector>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<SparseNumberVector>
public boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<SparseNumberVector>
isMetric
in class AbstractPrimitiveDistanceFunction<SparseNumberVector>
true
when metric.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.