|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<V,DoubleDistance> de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.AbstractDimensionsSelectingDoubleDistanceFunction<NumberVector<?,?>> de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.DimensionsSelectingEuclideanDistanceFunction
public class DimensionsSelectingEuclideanDistanceFunction
Provides a distance function that computes the Euclidean distance between feature vectors only in specified dimensions.
Nested Class Summary | |
---|---|
static class |
DimensionsSelectingEuclideanDistanceFunction.Parameterizer
Parameterization class. |
Field Summary |
---|
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.AbstractDimensionsSelectingDoubleDistanceFunction |
---|
DIMS_ID |
Constructor Summary | |
---|---|
DimensionsSelectingEuclideanDistanceFunction(BitSet dimensions)
Constructor. |
Method Summary | ||
---|---|---|
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. |
|
|
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. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.AbstractDimensionsSelectingDoubleDistanceFunction |
---|
distance, equals, getDistanceFactory, getSelectedDimensions, setSelectedDimensions |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction |
---|
isSymmetric |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.PrimitiveDistanceFunction |
---|
distance |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction |
---|
getDistanceFactory, isSymmetric |
Constructor Detail |
---|
public DimensionsSelectingEuclideanDistanceFunction(BitSet dimensions)
dimensions
- Selected dimensionsMethod Detail |
---|
public double doubleDistance(NumberVector<?,?> v1, NumberVector<?,?> v2)
doubleDistance
in interface PrimitiveDoubleDistanceFunction<NumberVector<?,?>>
v1
- first feature vectorv2
- second feature vector
protected 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 object
public double doubleCenterDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleCenterDistance
in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>
mbr1
- the first MBR objectmbr2
- the second MBR object
public DoubleDistance minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR object
public DoubleDistance centerDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
centerDistance
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR object
public VectorFieldTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
public boolean isMetric()
DistanceFunction
isMetric
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)
AbstractPrimitiveDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
database
- Representation
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |