Dynamic dimensions
Willi Richert
w.richert at gmx.net
Sun Mar 29 07:27:34 UTC 2009
On Freitag 27 März 2009 20:10:37 martin f krafft wrote:
> also sprach Willi Richert <w.richert at gmx.net> [2009.03.27.1959 +0100]:
> > I just send the patch for a new libkdtree++ version where you don't have
> > to specify the number of dimensions at compile time. I moved the template
> > parameter __K to a normal KDTree argument dim.
>
> Why? What happens when you now search a 3D tree with a 2D or 4D
> coordinate?
That could easily be solved by assertions at the according methods, imho.
Isn't assert ignored if you compile with all gcc optimizations enabled? Then
one would have checks while developing and then abandon those for the final
release.
Regards,
wr
More information about the libkdtree-devel
mailing list