<div dir="ltr"><br><br><div class="gmail_quote">2008/9/30 Sylvain Bougerel <span dir="ltr">&lt;<a href="mailto:sylvain.bougerel.devel@gmail.com">sylvain.bougerel.devel@gmail.com</a>&gt;</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&#39;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&#39;t think that Anju wanted to change it on the fly.&nbsp; Maybe just at initialisation time ?&nbsp; eg<br><br>KDTree&lt;Node&gt; tree(5);&nbsp;&nbsp; // for 5 dimensions<br>&nbsp;<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&#39;t been swift in pursuing this possibility, but off top of head i think it is achievable.&nbsp; <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&#39;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&#39;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>
&lt;<a href="mailto:pkambadu@indiana.edu">pkambadu@indiana.edu</a>&gt; wrote:<br>
&gt; Dear Authors,<br>
&gt;<br>
&gt; Firstly, let me apologize for the lengthy mail.<br>
&gt;<br>
&gt; We (Indiana University and IBM) have a generic parallel library (PFunc) that<br>
&gt; will be open sourced in the near future. Being generic, it allows users to<br>
&gt; plug in different components. One such component of our generic library are<br>
&gt; the queues used to manage tasks. We have users who want to use KDTrees for<br>
&gt; their task queue management. This allows them to execute tasks which are<br>
&gt; nearest neighbors of the previous tasks. We have found that your<br>
&gt; implementation is very thorough and easy to understand, and as such are<br>
&gt; happy to recommend our users to use. However, some users have complained<br>
&gt; about the lack of a particular feature.<br>
&gt;<br>
&gt; Your KDTree implementation pegs the dimensionality of the tree at compile<br>
&gt; time. While I understand the reasons for doing so (my background is in<br>
&gt; generic programming as well), it inhibits from users to dynamically change<br>
&gt; the dimensionality. As a simple example of why this might be required,<br>
&gt; consider weather modeling. Depending of what needs to be modeled (pressure,<br>
&gt; humidity, etc), the dimensionality of the data changes. As you can see, your<br>
&gt; current KDTree implementation does not allow for this.<br>
&gt;<br>
&gt; Is there some way of changing this?<br>
&gt;<br>
&gt; Please let me know,<br>
&gt;<br>
&gt; Anju<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div class="Wj3C7c">&gt; _______________________________________________<br>
&gt; libkdtree-devel mailing list<br>
&gt; <a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
&gt; <a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
&gt;<br>
&gt;<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>