Package elki.database.query.distance
Class SpatialPrimitiveDistanceQuery<V extends SpatialComparable>
- java.lang.Object
-
- elki.database.query.distance.PrimitiveDistanceQuery<V>
-
- elki.database.query.distance.SpatialPrimitiveDistanceQuery<V>
-
- Type Parameters:
V
- Vector type to use
- All Implemented Interfaces:
DistanceQuery<V>
,SpatialDistanceQuery<V>
- Direct Known Subclasses:
SpatialPrimitiveDistanceSimilarityQuery
public class SpatialPrimitiveDistanceQuery<V extends SpatialComparable> extends PrimitiveDistanceQuery<V> implements SpatialDistanceQuery<V>
Distance query for spatial distance functions- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected SpatialPrimitiveDistance<? super V>
distanceFunction
The distance function we use.-
Fields inherited from class elki.database.query.distance.PrimitiveDistanceQuery
relation
-
-
Constructor Summary
Constructors Constructor Description SpatialPrimitiveDistanceQuery(Relation<? extends V> relation, SpatialPrimitiveDistance<? super V> distanceFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpatialPrimitiveDistance<? super V>
getDistance()
Get the inner distance function.double
minDist(SpatialComparable mbr, DBIDRef id)
Computes the minimum distance between the given MBR and the FeatureVector object according to this distance function.double
minDist(SpatialComparable mbr, V v)
Computes the minimum distance between the given MBR and the FeatureVector object according to this distance function.-
Methods inherited from class elki.database.query.distance.PrimitiveDistanceQuery
distance, distance, distance, distance, getRelation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.database.query.distance.DistanceQuery
distance, distance, distance, distance, getRelation
-
-
-
-
Field Detail
-
distanceFunction
protected final SpatialPrimitiveDistance<? super V extends SpatialComparable> distanceFunction
The distance function we use.
-
-
Constructor Detail
-
SpatialPrimitiveDistanceQuery
public SpatialPrimitiveDistanceQuery(Relation<? extends V> relation, SpatialPrimitiveDistance<? super V> distanceFunction)
- Parameters:
relation
- Representation to usedistanceFunction
- Distance function to use
-
-
Method Detail
-
minDist
public double minDist(SpatialComparable mbr, V v)
Description copied from interface:SpatialDistanceQuery
Computes the minimum distance between the given MBR and the FeatureVector object according to this distance function.- Specified by:
minDist
in interfaceSpatialDistanceQuery<V extends SpatialComparable>
- Parameters:
mbr
- the MBR objectv
- the FeatureVector object- Returns:
- the minimum distance between the given MBR and the FeatureVector object according to this distance function
-
minDist
public double minDist(SpatialComparable mbr, DBIDRef id)
Description copied from interface:SpatialDistanceQuery
Computes the minimum distance between the given MBR and the FeatureVector object according to this distance function.- Specified by:
minDist
in interfaceSpatialDistanceQuery<V extends SpatialComparable>
- Parameters:
mbr
- the MBR objectid
- the query object id- Returns:
- the minimum distance between the given MBR and the FeatureVector object according to this distance function
-
getDistance
public SpatialPrimitiveDistance<? super V> getDistance()
Description copied from interface:DistanceQuery
Get the inner distance function.- Specified by:
getDistance
in interfaceDistanceQuery<V extends SpatialComparable>
- Specified by:
getDistance
in interfaceSpatialDistanceQuery<V extends SpatialComparable>
- Overrides:
getDistance
in classPrimitiveDistanceQuery<V extends SpatialComparable>
- Returns:
- Distance function
-
-