thesamet / kdtree-scala

KDTree and KDTreeMap implementation in Scala
Apache License 2.0
33 stars 13 forks source link

regionQuery supported but README states that only neighbours lookup supported #13

Open davidbkemp opened 4 years ago

davidbkemp commented 4 years ago

Nice implementation. I need a KD-Tree implementation with region query support and I was initially put off by the statement in the README that

Currently the only operation supported is n-nearest neighbors lookup

But looking at the code, it seems that region queries are supported.

So, is it true that I should be able to use this to find all nodes within a “region”. eg. within a rectangular area for a 2D dataset?

thesamet commented 4 years ago

Hi David, I wrote this code long time ago and can't recall if the note in the README is accurate. I do see there's a method called regionQuery which suggests it isn't. Feel free to check if this works as you'd like, and I'll be happy to take a PR for either the doc or the README.