Answer for: 2D-Tree: Search within rectangular region

Shane Stafford shane at stellarscience.com
Fri Jun 26 21:44:05 UTC 2009


> Paul Harris schrieb:
> >/ Off top of head, I think you can define a Range and then call find() with
> />/ that.
> />/ Sorry I can't be more precise.
> /
> Thanks for the quick reply, however don't know how to create such a
> range. I've tried with Region, but I don't know how to initialise it.
>
> I've attached what I tried last (fails to compile), maybe anyone can
> make this work. A working version of the attached code would probably be
> a nice addition to the examples directory.
>
> Best Regards
> Willi Mann
I just joined the list and saw that this did not appear to be resolved. In version 0.7.1, you just need to construct _Region with a value and then use the set_high_bound and set_low_bound members to search an orthotope instead of a hypercube.

Shane





More information about the libkdtree-devel mailing list