V
- Vector type to useD
- Distance result typepublic class SpatialPrimitiveDistanceQuery<V extends SpatialComparable,D extends Distance<D>> extends PrimitiveDistanceQuery<V,D> implements SpatialDistanceQuery<V,D>
Modifier and Type | Field and Description |
---|---|
protected SpatialPrimitiveDistanceFunction<? super V,D> |
distanceFunction
The distance function we use.
|
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
SpatialPrimitiveDistanceQuery(Relation<? extends V> relation,
SpatialPrimitiveDistanceFunction<? super V,D> distanceFunction) |
Modifier and Type | Method and Description |
---|---|
D |
centerDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the centroids of the two given MBRs according
to this distance function.
|
SpatialPrimitiveDistanceFunction<? super V,D> |
getDistanceFunction()
Get the inner distance function.
|
D |
mbrDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
D |
minDist(SpatialComparable mbr,
DBID id)
Computes the minimum distance between the given MBR and the FeatureVector
object according to this distance function.
|
D |
minDist(SpatialComparable mbr,
V v)
Computes the minimum distance between the given MBR and the FeatureVector
object according to this distance function.
|
distance, distance, distance, distance
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, distance, distance, distance, getDistanceFactory, getRelation, infiniteDistance, nullDistance, undefinedDistance
protected final SpatialPrimitiveDistanceFunction<? super V extends SpatialComparable,D extends Distance<D>> distanceFunction
public SpatialPrimitiveDistanceQuery(Relation<? extends V> relation, SpatialPrimitiveDistanceFunction<? super V,D> distanceFunction)
relation
- Representation to usedistanceFunction
- Distance function to usepublic D centerDistance(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialDistanceQuery
centerDistance
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic D mbrDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialDistanceQuery
mbrDist
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic D minDist(SpatialComparable mbr, V v)
SpatialDistanceQuery
minDist
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
mbr
- the MBR objectv
- the FeatureVector objectpublic D minDist(SpatialComparable mbr, DBID id)
SpatialDistanceQuery
minDist
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
mbr
- the MBR objectid
- the query object idpublic SpatialPrimitiveDistanceFunction<? super V,D> getDistanceFunction()
DistanceQuery
getDistanceFunction
in interface DistanceQuery<V extends SpatialComparable,D extends Distance<D>>
getDistanceFunction
in interface SpatialDistanceQuery<V extends SpatialComparable,D extends Distance<D>>
getDistanceFunction
in class PrimitiveDistanceQuery<V extends SpatialComparable,D extends Distance<D>>