<div dir="ltr"><br><br><div class="gmail_quote">2008/9/30 Sylvain Bougerel <span dir="ltr"><<a href="mailto:sylvain.bougerel.devel@gmail.com">sylvain.bougerel.devel@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Well, I don't think this is the goal of the library. AFAIK, there is<br>
no such kd-tree that can change the dimensionality on the fly. The<br>
reason for this is: the KD-tree invariant is based on the number of<br>
dimensions. Changing the number of dimension is equivalent to<br>
repopulate the entire Kd-tree.<br>
</blockquote><div><br>I don't think that Anju wanted to change it on the fly. Maybe just at initialisation time ? eg<br><br>KDTree<Node> tree(5); // for 5 dimensions<br> <br>I think this is doable, but it means taking the template parameter and converting it into a variable stored in the class.<br>
<br>Sorry I haven't been swift in pursuing this possibility, but off top of head i think it is achievable. <br><br>What do you think Sylvain?<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
The force of this library, however, lies in the fact that we do not<br>
rebuild the entire tree when we change the set of data. We just<br>
add/remove one element to the tree. So this library makes sense if you<br>
have a lot of modifications going on in your data set.<br>
<br>
If you are only looking for nearest neighbor search performance, and<br>
your data is not being modified very often, I recommend you to use<br>
either ANN, or CGAL's kd-tree. They only build the kd-tree to reply to<br>
the nearest neighbor query, and, at the time of the query, you will<br>
most likely know exactly how many dimensions you'll be working with.<br>
<br>
Hope this helps.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Sylvain<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Sep 26, 2008 at 2:55 AM, Prabhanjan Kambadur<br>
<<a href="mailto:pkambadu@indiana.edu">pkambadu@indiana.edu</a>> wrote:<br>
> Dear Authors,<br>
><br>
> Firstly, let me apologize for the lengthy mail.<br>
><br>
> We (Indiana University and IBM) have a generic parallel library (PFunc) that<br>
> will be open sourced in the near future. Being generic, it allows users to<br>
> plug in different components. One such component of our generic library are<br>
> the queues used to manage tasks. We have users who want to use KDTrees for<br>
> their task queue management. This allows them to execute tasks which are<br>
> nearest neighbors of the previous tasks. We have found that your<br>
> implementation is very thorough and easy to understand, and as such are<br>
> happy to recommend our users to use. However, some users have complained<br>
> about the lack of a particular feature.<br>
><br>
> Your KDTree implementation pegs the dimensionality of the tree at compile<br>
> time. While I understand the reasons for doing so (my background is in<br>
> generic programming as well), it inhibits from users to dynamically change<br>
> the dimensionality. As a simple example of why this might be required,<br>
> consider weather modeling. Depending of what needs to be modeled (pressure,<br>
> humidity, etc), the dimensionality of the data changes. As you can see, your<br>
> current KDTree implementation does not allow for this.<br>
><br>
> Is there some way of changing this?<br>
><br>
> Please let me know,<br>
><br>
> Anju<br>
><br>
><br>
><br>
</div></div><div><div></div><div class="Wj3C7c">> _______________________________________________<br>
> libkdtree-devel mailing list<br>
> <a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
> <a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
><br>
><br>
<br>
_______________________________________________<br>
libkdtree-devel mailing list<br>
<a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
</div></div></blockquote></div><br></div>