public class VAFile.VAFileKNNQuery extends AbstractRefiningIndex.AbstractKNNQuery<DoubleDistance>
Modifier and Type | Field and Description |
---|---|
(package private) double |
p
LP Norm p parameter.
|
distanceQuery
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
VAFile.VAFileKNNQuery(DistanceQuery<V,DoubleDistance> distanceQuery,
double p)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistanceKNNList |
getKNNForObject(V query,
int k)
Get the k nearest neighbors for a particular id.
|
incRefinements, refine
getKNNForBulkDBIDs, getKNNForDBID
getRelation
public VAFile.VAFileKNNQuery(DistanceQuery<V,DoubleDistance> distanceQuery, double p)
distanceQuery
- Distance query objectp
- LP norm ppublic DoubleDistanceKNNList getKNNForObject(V query, int k)
KNNQuery
getKNNForObject
in interface KNNQuery<V extends NumberVector<?>,DoubleDistance>
getKNNForObject
in class AbstractDistanceKNNQuery<V extends NumberVector<?>,DoubleDistance>
query
- Query objectk
- Number of neighbors requested