@Alias(value={"minimum","min","de.lmu.ifi.dbs.elki.distance.distancefunction.MinimumDistanceFunction"}) public class MinimumDistanceFunction extends AbstractNumberVectorDistanceFunction implements SpatialPrimitiveDistanceFunction<NumberVector>, Norm<NumberVector>
NumberVector
s.
Minimum distance is defined as: \[ \text{Minimum}_p(\vec{x},\vec{y}) := \min_i |x_i-y_i| \]
This is not a metric, but can sometimes be useful as a lower bound.
Modifier and Type | Class and Description |
---|---|
static class |
MinimumDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static MinimumDistanceFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
MinimumDistanceFunction()
Deprecated.
Use static instance!
|
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(java.lang.Object obj) |
int |
hashCode() |
boolean |
isMetric()
Is this distance function metric (satisfy the triangle inequality)
|
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.
|
java.lang.String |
toString() |
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
instantiate
getInputTypeRestriction
isSquared, isSymmetric
public static final MinimumDistanceFunction STATIC
@Deprecated public MinimumDistanceFunction()
STATIC
instead.public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double norm(NumberVector v)
Norm
norm
in interface Norm<NumberVector>
v
- Objectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector>
true
when metric.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.