nearest-neighbor search

main branch alternative branch

Binary tree

2D space

Nearest point-
Upper bound (ub)-
Partition distance (lb)-