Practical additions to kdtree library

Sylvain Bougerel sylvain.bougerel.devel at gmail.com
Tue Sep 30 02:42:13 UTC 2008


On Tue, Sep 30, 2008 at 10:08 AM, Paul Harris <paulharris at computer.org> wrote:
>
> KDTree<Node> tree(5);   // for 5 dimensions
>
> I think this is doable, but it means taking the template parameter and
> converting it into a variable stored in the class.
>
> Sorry I haven't been swift in pursuing this possibility, but off top of head
> i think it is achievable.
>

Understood. Yes it should be possible.

However, from the top of my head (take this with precautions):

This could trigger some further rewriting of the library. If you have
looked into the library, most algorithms are recursive. It will be a
particular problem for you, because the dimension will become a
variable for the tree, whereas it used to be template parameter
available at all level of the recursion. So, there will be a need to
rewrite all the functions based on a recursive algorithm, to make them
aware of the new 'dimension' variable.

It could be quite a bit of work, but feasible.

Can you confirm this, Paul?

>> On Fri, Sep 26, 2008 at 2:55 AM, Prabhanjan Kambadur
>> <pkambadu at indiana.edu> wrote:
>> > Dear Authors,
>> >
>> > Firstly, let me apologize for the lengthy mail.
>> >
>> > We (Indiana University and IBM) have a generic parallel library (PFunc)
>> > that
>> > will be open sourced in the near future. Being generic, it allows users
>> > to
>> > plug in different components. One such component of our generic library
>> > are
>> > the queues used to manage tasks. We have users who want to use KDTrees
>> > for
>> > their task queue management. This allows them to execute tasks which are
>> > nearest neighbors of the previous tasks. We have found that your
>> > implementation is very thorough and easy to understand, and as such are
>> > happy to recommend our users to use. However, some users have complained
>> > about the lack of a particular feature.
>> >
>> > Your KDTree implementation pegs the dimensionality of the tree at
>> > compile
>> > time. While I understand the reasons for doing so (my background is in
>> > generic programming as well), it inhibits from users to dynamically
>> > change
>> > the dimensionality. As a simple example of why this might be required,
>> > consider weather modeling. Depending of what needs to be modeled
>> > (pressure,
>> > humidity, etc), the dimensionality of the data changes. As you can see,
>> > your
>> > current KDTree implementation does not allow for this.
>> >
>> > Is there some way of changing this?
>> >
>> > Please let me know,
>> >
>> > Anju
>> >
>> >
>> >
>> > _______________________________________________
>> > libkdtree-devel mailing list
>> > libkdtree-devel at lists.alioth.debian.org
>> > http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel
>> >
>> >
>>
>> _______________________________________________
>> libkdtree-devel mailing list
>> libkdtree-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel
>
>



More information about the libkdtree-devel mailing list