removeOld() not working? Or locationCount not decrementing after removeOld()?
Fragment of a discussion from User talk:Rednaxela/kD-Tree
← Thread:User talk:Rednaxela/kD-Tree/removeOld() not working? Or locationCount not decrementing after removeOld()?/reply (8)
Jump to navigation
Jump to search
← Thread:User talk:Rednaxela/kD-Tree/removeOld() not working? Or locationCount not decrementing after removeOld()?/reply (8)
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
Pretty much yeah, though it does avoid the full effort of sorting them by using a min-max heap that tosses the most distant points off and keeps the closest point accessible in constant time. The search algorithm is exactly the same as searching for all 200 (it needs to remember the 200 closest points it's found so far, and know what the furthest and closest ones of that set are), except that it pauses the search when when it is able to determine that no unchecked branch could have anything closer than the closest point not yet returned by the iterator.