ubilabs / kd-tree-javascript

JavaScript k-d Tree Implementation
MIT License
638 stars 108 forks source link

Support range searches #2

Open Robdr opened 12 years ago

Robdr commented 12 years ago

it would be great if next to nearest neighbor searches range searches are supported.

Robdr commented 11 years ago

Any news on this? Or hints on how to implement it? Would be nice to give it a try.

mirceapricop commented 11 years ago

The algorithm is nicely described here for 2 dimensions: http://www.cs.utah.edu/~lifeifei/cs6931/kdtree.pdf

You'd need to extend it to work for any number of dimensions, though. It's not really that hard, if you look at how insertion, deletion and retrieval were extended.

berli888 commented 11 years ago

Did anyone implement the range search ?

Robdr commented 11 years ago

Un fortunately I didn't have the time to work on it. Anyone else interested in working on it?

benmaier commented 1 year ago

As I needed range searches, I wrote my own implementation today, plugging it here: https://github.com/benmaier/kd-tree-js