de.lmu.ifi.dbs.elki.database.query.distance
Class SpatialPrimitiveDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceQuery<V,D>
de.lmu.ifi.dbs.elki.database.query.distance.SpatialPrimitiveDistanceQuery<V,D>
- Type Parameters:
V
- Vector type to useD
- Distance result type
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<V,D>, SpatialDistanceQuery<V,D>
public class SpatialPrimitiveDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- extends PrimitiveDistanceQuery<V,D>
- implements SpatialDistanceQuery<V,D>
Distance query for spatial distance functions
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
distanceFunction
protected final SpatialPrimitiveDistanceFunction<? super V extends SpatialComparable,D extends Distance<D>> distanceFunction
- The distance function we use.
SpatialPrimitiveDistanceQuery
public SpatialPrimitiveDistanceQuery(Relation<? extends V> relation,
SpatialPrimitiveDistanceFunction<? super V,D> distanceFunction)
- Parameters:
relation
- Representation to usedistanceFunction
- Distance function to use
centerDistance
public D centerDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
- Description copied from interface:
SpatialDistanceQuery
- Computes the distance between the centroids of the two given MBRs according
to this distance function.
- Specified by:
centerDistance
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- Parameters:
mbr1
- the first MBR objectmbr2
- the second MBR object
- Returns:
- the distance between the centroids of the two given MBRs according
to this distance function
mbrDist
public D mbrDist(SpatialComparable mbr1,
SpatialComparable mbr2)
- Description copied from interface:
SpatialDistanceQuery
- Computes the distance between the two given MBRs according to this distance
function.
- Specified by:
mbrDist
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- Parameters:
mbr1
- the first MBR objectmbr2
- the second MBR object
- Returns:
- the distance between the two given MBRs according to this distance
function
minDist
public D 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 interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- 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 D minDist(SpatialComparable mbr,
DBID 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 interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- 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
getDistanceFunction
public SpatialPrimitiveDistanceFunction<? super V,D> getDistanceFunction()
- Description copied from interface:
DistanceQuery
- Get the inner distance function.
- Specified by:
getDistanceFunction
in interface DistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- Specified by:
getDistanceFunction
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- Overrides:
getDistanceFunction
in class PrimitiveDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
- Returns:
- Distance function