nanoflann icon indicating copy to clipboard operation
nanoflann copied to clipboard

The value of DIM at run time?

Open meznah opened this issue 6 years ago • 1 comments

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,

meznah avatar Jul 12 '18 20:07 meznah

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.

liaopeiyuan avatar May 20 '20 09:05 liaopeiyuan