NearestNeighbors.jl icon indicating copy to clipboard operation
NearestNeighbors.jl copied to clipboard

Add inrange2() to find points between two radiuses

Open chuong opened this issue 8 years ago • 3 comments

This is useful when searching for points at a radius from fixed position with a tolerance. This is equivalent to, but more efficient than, using two inrange() operations for two different radiuses and then finding point that belong to only the larger radius.

chuong avatar Sep 04 '17 12:09 chuong

Some tests in test_monkey.jl failed, but none of these relate to inrange2() implementation. Somehow I don't have these fail tests on my computer.

chuong avatar Sep 04 '17 12:09 chuong

Thanks for the PR! Do you think perhaps in_range_interval is more descriptive? The 2 is a bit obscure to me, is it used in similar packages in other programming langauges?

Also, would be nice with a few more tests on a larger set of points where you compare that you get the same result for all the different type of trees.

KristofferC avatar Sep 14 '17 12:09 KristofferC

Thanks. Your suggestions are all possible. in_range_interval is a meaningful name. How about inranges?

I am struggling with naming the new function. On Wikipedia, new function is similar to range search, while the existing inrange function is called radiusSearch in Point Cloud Library and OpenCV. What do you think?

chuong avatar Sep 15 '17 13:09 chuong