O
- Object typeD
- Distance typepublic interface KNNQuery<O,D extends Distance<D>> extends DatabaseQuery
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Modifier and Type | Method and Description |
---|---|
D |
getDistanceFactory()
Get the distance data type of the function.
|
DistanceQuery<O,D> |
getDistanceQuery()
Get the distance query for this function.
|
List<List<DistanceResultPair<D>>> |
getKNNForBulkDBIDs(ArrayDBIDs ids,
int k)
Bulk query method
|
void |
getKNNForBulkHeaps(Map<DBID,KNNHeap<D>> heaps)
Bulk query method configured by a map.
|
List<DistanceResultPair<D>> |
getKNNForDBID(DBID id,
int k)
Get the k nearest neighbors for a particular id.
|
List<DistanceResultPair<D>> |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id.
|
Relation<? extends O> |
getRelation()
Access the underlying data query.
|
List<DistanceResultPair<D>> getKNNForDBID(DBID id, int k)
id
- query object IDk
- Number of neighbors requestedList<List<DistanceResultPair<D>>> getKNNForBulkDBIDs(ArrayDBIDs ids, int k)
ids
- query object IDsk
- Number of neighbors requestedvoid getKNNForBulkHeaps(Map<DBID,KNNHeap<D>> heaps)
heaps
- Map of heaps to fill.List<DistanceResultPair<D>> getKNNForObject(O obj, int k)
obj
- Query objectk
- Number of neighbors requestedDistanceQuery<O,D> getDistanceQuery()
D getDistanceFactory()