Optimising optimise()

Eric Fowler eric.fowler at gmail.com
Sat May 3 04:47:21 UTC 2008


Well I have noticed that running optimise() on a tree of half a million
points seems to take twice as long (or more) than building the tree from
zero.

So why run it? I was under the impression that removal of elements from a
tree with erase() or erase_exact() left the tree in a undefined condition so
further searches might miss points. Is that right? Or is optimise() just
about performance, not correctness?

If that is the case, perhaps the tree could be extended so when an item is
removed, the tree flags the highest node that is above everything in need of
optimisation, so optimise() can search the tree only for subtrees that
really need the treatment, thus saving time.

Just my $0.02.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20080502/182aba6a/attachment.htm 


More information about the libkdtree-devel mailing list