Lots of changes from me

Paul Harris paulharris at computer.org
Mon Oct 1 10:21:31 UTC 2007


Hi all,

Good to see kdtree++ is alive again.

I have a bunch of changes that I've made over a period of time,
unfortunately as the arch repo died a long time ago, they aren't in
the form of a series of patches.   Instead, I have One Big Patch for
you.  This is obviously not ideal, smaller patches would be better,
but, lets press on shall we?

So, how do I do this?   Can I get a branch to push/pull my changes?
Do I send some sort of patch to you via git?
What are the git commands?


As for my changes, they will:

* Improve the const correctness, including adding _M_get_*() and
_M_set_*() functions.

This means const kdtrees can be searched, so you could do:

template <class Tree>
void search_tree( Tree const& tree )
{
   tree.find_nearest(etc,etc);
}

and it will compile.  previously, you would've needed a non-const
reference to do anything with the tree.



* Add new features:  find_nearest_if ()    visit_within_range ()
find_exact ()

There is a nice big comment on why you need find_exact()



* Adds a check_tree() verifier, and a num_dist_calcs
performance-checking-variable (I used while debugging my changes).



* the _M_erase() has been overhauled so it will erase the link and
keep the tree valid.



* Some parameter name changes along the way.  Sorry, this will make
things a little more confusing.



* And a change to region.hpp's intersects_with() test, with a comment
explaining the new logic.   I forget why I had to change this, I guess
it wasn't giving the correct results?



thanks
Paul



More information about the libkdtree-devel mailing list