paulharris at computer.org
Sat Mar 28 08:20:08 UTC 2009
2009/3/28 martin f krafft <madduck at debian.org>
> also sprach Paul Harris <paulharris at computer.org> [2009.03.28.0854 +0100]:
> > So, Willi, would it be possible to adjust your patch so that IF
> > the N template parameter is zero, only THEN does it morph kdtree
> > into a dynamic-dimensions tree ? ie Ignore the constructor
> > parameter unless N=0
> I would use template specification here.
You mean an additional template parameter?
> > I don't really like that solution either, as it relies on reusing
> > N for a different purpose. What if someone wants to detect errors
> > where their program is trying to create a zero-dimension tree
> > (possible when users create additional templated layers around
> > kdtree).
> What about compiler directives: #ifdef ...
Not a bad idea, but that excludes those who want a template kdtree and a
dynamic-dimensions kdtree. I may have such a requirement in the future, if
I add a feature where the user can choose what data to index and search.
That tree would be dynamic, and the usual trees would be static.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libkdtree-devel