## Class MinimumDistance

• All Implemented Interfaces:
Distance<NumberVector>, Norm<NumberVector>, NumberVectorDistance<NumberVector>, PrimitiveDistance<NumberVector>, SpatialPrimitiveDistance<NumberVector>

@Alias({"minimum","min"})
public class MinimumDistance
extends AbstractNumberVectorDistance
implements SpatialPrimitiveDistance<NumberVector>, Norm<NumberVector>
Minimum distance for NumberVectors.

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.

Since:
0.3
Author:
Erich Schubert
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  MinimumDistance.Par
Parameterization class.
• ### Field Summary

Fields
Modifier and Type Field Description
static MinimumDistance STATIC
Static instance.
• ### Constructor Summary

Constructors
Constructor Description
MinimumDistance()
Deprecated.
Use static instance!
• ### Method Summary

All Methods
Modifier and Type Method 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()
• ### Methods inherited from class elki.distance.AbstractNumberVectorDistance

dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface elki.distance.Distance

isSquared, isSymmetric
• ### Methods inherited from interface elki.distance.PrimitiveDistance

getInputTypeRestriction
• ### Methods inherited from interface elki.distance.SpatialPrimitiveDistance

instantiate
• ### Field Detail

• #### STATIC

public static final MinimumDistance STATIC
Static instance. Use this.
• ### Constructor Detail

• #### MinimumDistance

@Deprecated
public MinimumDistance()
Deprecated.
Use static instance!
Constructor - use STATIC instead.
• ### Method Detail

• #### distance

public double distance​(NumberVector v1,
NumberVector v2)
Description copied from interface: PrimitiveDistance
Computes the distance between two given DatabaseObjects according to this distance function.
Specified by:
distance in interface NumberVectorDistance<NumberVector>
Specified by:
distance in interface PrimitiveDistance<NumberVector>
Parameters:
v1 - first DatabaseObject
v2 - second DatabaseObject
Returns:
the distance between two given DatabaseObjects according to this distance function
• #### norm

public double norm​(NumberVector v)
Description copied from interface: Norm
Compute the norm of object obj.
Specified by:
norm in interface Norm<NumberVector>
Parameters:
v - Object
Returns:
Norm
• #### minDist

public double minDist​(SpatialComparable mbr1,
SpatialComparable mbr2)
Description copied from interface: SpatialPrimitiveDistance
Computes the distance between the two given MBRs according to this distance function.
Specified by:
minDist in interface SpatialPrimitiveDistance<NumberVector>
Parameters:
mbr1 - the first MBR object
mbr2 - the second MBR object
Returns:
the distance between the two given MBRs according to this distance function
• #### isMetric

public boolean isMetric()
Description copied from interface: Distance
Is this distance function metric (satisfy the triangle inequality)
Specified by:
isMetric in interface Distance<NumberVector>
Returns:
true when metric.
• #### toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
• #### equals

public boolean equals​(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object