kNN queries
|
- Query
and a positive integer ![](images/img420.png)
|
- For
, compute minimum distance to any object in it
|
|
|
- Maintain a heap with distance to
object as ![](images/img389.png)
|
- Prune
if
|
|
|
- Initially,
![](images/img568.png)
|
- Traverse children in sorted order of
![](images/img569.png)
|
- Also compute maximum distance to any object in
![](images/img550.png)
|
|
|
- Prune
if
|
|
and ![](images/img572.png)
|
|
- At least
objects in have lower distances
|