Incremental nearest neighbor |
- Producing sorted lists required for FA and TA can be done efficiently by incrementally returning nearest neighbors
|
- Incremental NN algorithm follows best-first strategy
|
- Assume a tree-based index structure
|
- Maintain a min heap of nodes and leaves ordered according to their minimum distances to query
|
- Initialize it with the root node
|
- Whenever a call for the next nearest neighbor is made
|
|
- Look at top element of heap
|
|
- If it is a leaf, return the object and stop
|
|
- If it is an internal node, delete it, and insert its children
|