
O - Object typepublic class DoubleOptimizedKNNQuery<O> extends LinearScanKNNQuery<O,DoubleDistance>
PrimitiveDoubleDistanceFunctions.| Modifier and Type | Field and Description |
|---|---|
(package private) PrimitiveDoubleDistanceFunction<O> |
rawdist
Raw distance function.
|
distanceQueryrelationHINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE| Constructor and Description |
|---|
DoubleOptimizedKNNQuery(PrimitiveDistanceQuery<O,DoubleDistance> distanceQuery)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
KNNList<DoubleDistance> |
getKNNForDBID(DBIDRef id,
int k)
Get the k nearest neighbors for a particular id.
|
KNNList<DoubleDistance> |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectBenchmarked(O obj,
int k)
It does not make sense, but this version is faster in our larger
benchmarks.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectBenchmarked2(O obj,
int k)
Another attempt at getting a faster knn heap.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectBenchmarked3(O obj,
int k)
Next attempt at exploiting the JIT fully.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectBenchmarked4(O obj,
int k)
Next attempt at exploiting the JIT fully.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectBenchmarked5(O obj,
int k)
Next attempt at exploiting the JIT fully.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectBenchmarked6(O obj,
int k)
Next attempt at exploiting the JIT fully.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectClean(O obj,
int k)
This is the cleaner, supposedly faster implementation.
|
(package private) KNNList<DoubleDistance> |
getKNNForObjectKNNHeap(O obj,
int k)
This is the straightforward implementation using the optimized heap.
|
getKNNForBulkDBIDsgetRelationPrimitiveDoubleDistanceFunction<O> rawdist
public DoubleOptimizedKNNQuery(PrimitiveDistanceQuery<O,DoubleDistance> distanceQuery)
distanceQuery - Distance function to usepublic KNNList<DoubleDistance> getKNNForDBID(DBIDRef id, int k)
KNNQuerygetKNNForDBID in interface KNNQuery<O,DoubleDistance>getKNNForDBID in class LinearScanKNNQuery<O,DoubleDistance>id - query object IDk - Number of neighbors requestedpublic KNNList<DoubleDistance> getKNNForObject(O obj, int k)
KNNQuerygetKNNForObject in interface KNNQuery<O,DoubleDistance>getKNNForObject in class LinearScanKNNQuery<O,DoubleDistance>obj - Query objectk - Number of neighbors requestedKNNList<DoubleDistance> getKNNForObjectKNNHeap(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectClean(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectBenchmarked(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectBenchmarked2(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectBenchmarked3(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectBenchmarked4(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectBenchmarked5(O obj, int k)
obj - Query objectk - Desired number of neighborsKNNList<DoubleDistance> getKNNForObjectBenchmarked6(O obj, int k)
obj - Query objectk - Desired number of neighbors