failed unittest in py-kdtree_test.py

Paul Harris paulharris at computer.org
Sun Dec 6 06:37:44 UTC 2009


2009/12/6 Jason Remillard <remillard.jason at gmail.com>

> Hi Paul,
>
> I pulled your git tree (at least I think) and updated the comments.
> The find_within_range is not using the manhattan distance metric, but
> rather an absolute distance metric. (what I meant by _abs) function.
>

What is your definition of manhattan distance metric?  is it not an absolute
distance metric?  i think my terminology doesn't match yours


> Nothing wrong with that, it is very fast. It just needs to be
> documented. The patch changes the comment, and adds in some more
> information that confused me when I first started using the library. I
> also took a stab at commenting the optimize function which also
> confused me when I was starting out.
>
>
Have a closer look at efficient_replace_and_optimise() or whatever i named
it.  better than normal optimise(), because YOU (The user) can supply a
vector<> that it will use as its working space (which means the vector will
be messed up), but it means it skips an additional copy, ie:

optimise( container ) // the normal one
{
   temp_vector; // skipped
   copy(container --> temp_vector); // skipped
   sort_and_insert(temp_vector);
}

I have not used git before, so hopefully the patch works.
>
> Thanks
> Jason.
>
>
looks ok when i glanced at it, but i have to go out now.  keep poking around
please :)

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20091206/b0c08326/attachment-0001.htm>


More information about the libkdtree-devel mailing list