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 |
---|---|
double |
doubleDistance(NumberVector<?> v1,
NumberVector<?> v2)
Returns the distance between the specified FeatureVectors as a LP-Norm for
the currently set p.
|
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) |
double |
doubleNorm(NumberVector<?> v)
Compute the norm of object obj as double value.
|
boolean |
equals(Object obj) |
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the
triangle equation?)
|
String |
toString() |
getP, instantiate, minDist
norm
distance, getDistanceFactory, getInputTypeRestriction
isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
instantiate, minDist
distance, getInputTypeRestriction
getDistanceFactory, isSymmetric
public static final EuclideanDistanceFunction STATIC
@Deprecated public EuclideanDistanceFunction()
public double doubleDistance(NumberVector<?> v1, NumberVector<?> v2)
LPNormDistanceFunction
doubleDistance
in interface PrimitiveDoubleDistanceFunction<NumberVector<?>>
doubleDistance
in class LPNormDistanceFunction
v1
- first FeatureVectorv2
- second FeatureVectorpublic double doubleNorm(NumberVector<?> v)
DoubleNorm
doubleNorm
in interface DoubleNorm<NumberVector<?>>
doubleNorm
in class LPNormDistanceFunction
v
- Objectprotected double doubleMinDistObject(SpatialComparable mbr, NumberVector<?> v)
public double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleMinDist
in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?>>
doubleMinDist
in class LPNormDistanceFunction
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 String toString()
toString
in class LPNormDistanceFunction
public boolean equals(Object obj)
equals
in class LPNormDistanceFunction