public class SmallMemoryKDTree.KDTreeKNNQuery extends AbstractDistanceKNNQuery<O>
Modifier and Type | Field and Description |
---|---|
private Norm<? super O> |
norm
Norm to use.
|
distanceQuery, relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
KDTreeKNNQuery(DistanceQuery<O> distanceQuery,
Norm<? super O> norm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
KNNList |
getKNNForObject(O obj,
int k)
Get the k nearest neighbors for a particular id.
|
private double |
kdKNNSearch(int left,
int right,
int axis,
O query,
KNNHeap knns,
DoubleDBIDListIter iter,
double maxdist)
Perform a kNN search on the kd-tree.
|
getKNNForBulkDBIDs, getKNNForDBID
private Norm<? super O extends NumberVector> norm
public KDTreeKNNQuery(DistanceQuery<O> distanceQuery, Norm<? super O> norm)
distanceQuery
- Distance querynorm
- Norm to usepublic KNNList getKNNForObject(O obj, int k)
KNNQuery
getKNNForObject
in interface KNNQuery<O extends NumberVector>
getKNNForObject
in class AbstractDistanceKNNQuery<O extends NumberVector>
obj
- Query objectk
- Number of neighbors requestedprivate double kdKNNSearch(int left, int right, int axis, O query, KNNHeap knns, DoubleDBIDListIter iter, double maxdist)
left
- Subtree beginright
- Subtree end (exclusive)axis
- Current splitting axisquery
- Query objectknns
- kNN heapiter
- Iterator variable (reduces memory footprint!)maxdist
- Current upper bound of kNN distance.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.