
O - Object typepublic class LinearScanRawDoubleDistanceKNNQuery<O> extends LinearScanPrimitiveDistanceKNNQuery<O,DoubleDistance>
PrimitiveDoubleDistanceFunctions.distanceQueryrelationHINT_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 |
|---|---|
KNNResult<DoubleDistance> |
getKNNForDBID(DBIDRef id,
int k)
Get the k nearest neighbors for a particular id.
|
KNNResult<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, getKNNForBulkHeapsgetRelationpublic LinearScanRawDoubleDistanceKNNQuery(PrimitiveDistanceQuery<O,DoubleDistance> distanceQuery)
distanceQuery - Distance function to usepublic KNNResult<DoubleDistance> getKNNForDBID(DBIDRef id, int k)
KNNQuerygetKNNForDBID in interface KNNQuery<O,DoubleDistance>getKNNForDBID in class LinearScanPrimitiveDistanceKNNQuery<O,DoubleDistance>id - query object IDk - Number of neighbors requestedpublic KNNResult<DoubleDistance> getKNNForObject(O obj, int k)
KNNQuerygetKNNForObject 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)
LinearScanPrimitiveDistanceKNNQuerylinearScanBatchKNN in class LinearScanPrimitiveDistanceKNNQuery<O,DoubleDistance>objs - Objects listheaps - Heaps array