nanoflann
nanoflann copied to clipboard
The value of DIM at run time?
First, I would like to thank you for sharing this very useful kNN library.
When using KDTreeSingleIndexAdaptor, I would like to send the DIM value at runtime. However, it is a constant expression right now. Is there a way to go around this rule?
I am interested on generating different datasets with different dimensions, then for each dataset, I want to do kNN and radius search after building the kd-tree. The value of DIM should be sent at runtime.
Thank you,
Removing the dim argument in your typedef should work. In this way, the dimension of the kd-tree will not be fixed at compile time.