public class EuclideanDistanceFunction extends LPNormDistanceFunction implements SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>
Modifier and Type | Class and Description |
---|---|
static class |
EuclideanDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static EuclideanDistanceFunction |
STATIC
Static instance.
|
P_ID
Constructor and Description |
---|
EuclideanDistanceFunction()
Deprecated.
Use static instance!
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
centerDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the centroids of the two given MBRs
according to this distance function.
|
double |
doubleCenterDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the centroids of the two given MBRs
according to this distance function.
|
double |
doubleDistance(NumberVector<?,?> v1,
NumberVector<?,?> v2)
Provides the Euclidean distance between the given two vectors.
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this
distance function.
|
protected double |
doubleMinDistObject(SpatialComparable mbr,
NumberVector<?,?> v) |
boolean |
equals(Object obj) |
<T extends NumberVector<?,?>> |
instantiate(Relation<T> relation)
Instantiate with a database to get the actual distance query.
|
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the
triangle equation?)
|
DoubleDistance |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this
distance function.
|
String |
toString() |
getP
distance, getDistanceFactory, getInputTypeRestriction
isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
distance, getInputTypeRestriction
getDistanceFactory, isSymmetric
public static final EuclideanDistanceFunction STATIC
@Deprecated public EuclideanDistanceFunction()
public double doubleDistance(NumberVector<?,?> v1, NumberVector<?,?> v2)
doubleDistance
in interface PrimitiveDoubleDistanceFunction<NumberVector<?,?>>
doubleDistance
in class LPNormDistanceFunction
v1
- first FeatureVectorv2
- second FeatureVectorprotected double doubleMinDistObject(SpatialComparable mbr, NumberVector<?,?> v)
public double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleMinDist
in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic DoubleDistance centerDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
centerDistance
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic DoubleDistance minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic double doubleCenterDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleCenterDistance
in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
isMetric
in class LPNormDistanceFunction
true
when metric.public <T extends NumberVector<?,?>> SpatialPrimitiveDistanceQuery<T,DoubleDistance> instantiate(Relation<T> relation)
AbstractPrimitiveDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
relation
- Representationpublic String toString()
toString
in class LPNormDistanceFunction
public boolean equals(Object obj)
equals
in class LPNormDistanceFunction