News for hackers. Stuff that matters.
Re:Damn Cool Algorithms: BK-Trees by shiro on Sunday October 21, 2007 @01:30AM (#70813)
It's easiser to understand by using 2D geometry. Pick one point on a paper and call it query, the input, and draw a circle of radius n around that point. Your goal is to find the points in the dataset which are inside the circle. Let's call those points answers.

Pick an arbitrary point (in the dataset) and call it test. The distance between test and query is d. Now, you can see the distance between test and the furthest and closest points in answers are d+n and d-n, respectively (assuming d > n).

Since the dataset is organized by distance, we can quickly narrow the range of search.

Re:Damn Cool Algorithms: BK-Trees by shahper on Sunday October 21, 2007 @12:19PM (#70891)
thanks dude, for clearing it up. I don't know why I always get confused on easy things like this..