
public class DimensionsSelectingEuclideanDistanceFunction extends AbstractDimensionsSelectingDoubleDistanceFunction<NumberVector<?,?>> implements SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>
| Modifier and Type | Class and Description |
|---|---|
static class |
DimensionsSelectingEuclideanDistanceFunction.Parameterizer
Parameterization class.
|
DIMS_ID| Constructor and Description |
|---|
DimensionsSelectingEuclideanDistanceFunction(BitSet dimensions)
Constructor.
|
| 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 two given feature vectors in the
selected dimensions.
|
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) |
VectorFieldTypeInformation<? super NumberVector<?,?>> |
getInputTypeRestriction()
Get the input data type of the function.
|
<T extends NumberVector<?,?>> |
instantiate(Relation<T> database)
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.
|
distance, equals, getDistanceFactory, getSelectedDimensions, setSelectedDimensionsisSymmetricclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdistancegetDistanceFactory, isSymmetricpublic DimensionsSelectingEuclideanDistanceFunction(BitSet dimensions)
dimensions - Selected dimensionspublic double doubleDistance(NumberVector<?,?> v1, NumberVector<?,?> v2)
doubleDistance in interface PrimitiveDoubleDistanceFunction<NumberVector<?,?>>v1 - first feature vectorv2 - second feature vectorprotected double doubleMinDistObject(SpatialComparable mbr, NumberVector<?,?> v)
public double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunctiondoubleMinDist in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic double doubleCenterDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunctiondoubleCenterDistance in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic DoubleDistance minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctionminDist in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic DoubleDistance centerDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctioncenterDistance in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic VectorFieldTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>public boolean isMetric()
DistanceFunctionisMetric in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>isMetric in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>true when metric.public <T extends NumberVector<?,?>> SpatialPrimitiveDistanceQuery<T,DoubleDistance> instantiate(Relation<T> database)
AbstractPrimitiveDistanceFunctioninstantiate in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>instantiate in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>instantiate in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>database - Representation