O
- Object typepublic class LinearScanRawDoubleDistanceKNNQuery<O> extends LinearScanPrimitiveDistanceKNNQuery<O,DoubleDistance>
PrimitiveDoubleDistanceFunction
s.distanceQuery
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
LinearScanRawDoubleDistanceKNNQuery(PrimitiveDistanceQuery<O,DoubleDistance> distanceQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<DistanceResultPair<DoubleDistance>> |
getKNNForDBID(DBID id,
int k)
Get the k nearest neighbors for a particular id.
|
List<DistanceResultPair<DoubleDistance>> |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id.
|
protected void |
linearScanBatchKNN(List<O> objs,
List<KNNHeap<DoubleDistance>> heaps)
Perform a linear scan batch kNN for primitive distance functions.
|
getKNNForBulkDBIDs, getKNNForBulkHeaps
getDistanceFactory, getDistanceQuery
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelation
public LinearScanRawDoubleDistanceKNNQuery(PrimitiveDistanceQuery<O,DoubleDistance> distanceQuery)
distanceQuery
- Distance function to usepublic List<DistanceResultPair<DoubleDistance>> getKNNForDBID(DBID id, int k)
KNNQuery
getKNNForDBID
in interface KNNQuery<O,DoubleDistance>
getKNNForDBID
in class LinearScanPrimitiveDistanceKNNQuery<O,DoubleDistance>
id
- query object IDk
- Number of neighbors requestedpublic List<DistanceResultPair<DoubleDistance>> getKNNForObject(O obj, int k)
KNNQuery
getKNNForObject
in interface KNNQuery<O,DoubleDistance>
getKNNForObject
in class LinearScanKNNQuery<O,DoubleDistance>
obj
- Query objectk
- Number of neighbors requestedprotected void linearScanBatchKNN(List<O> objs, List<KNNHeap<DoubleDistance>> heaps)
LinearScanPrimitiveDistanceKNNQuery
linearScanBatchKNN
in class LinearScanPrimitiveDistanceKNNQuery<O,DoubleDistance>
objs
- Objects listheaps
- Heaps array