|
Geometry : |
Subject: [ggl] spacial index construction interface
From: Bruno Lalande (bruno.lalande)
Date: 2011-03-10 05:57:03
> I just realised one thing. In this desing we canot rely on parents or any
> other node reference/pointer because std::vector can move it somewhere. It
> is posible that the whole index should be redesigned. We can't copy nodes
> because we'd copy whole subtree. Storing node's path (indexes from root and
> reference to root) is a poor option. All methods should just move top-down
> but I don't know if it's possible in all cases. What do you think?
>
You're right. If it's really necessary to maintain a pointer to parent, then
we'll probably have to stick to dynamic memory allocation.
Furthermore this raises another point: if a vector re-copies all its
contents from one buffer to another one on a resize() for instance, the
whole underlying tree is copied. This is likely to defeat the purpose of not
using dynamic allocation for performance reasons...
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20110310/163e165a/attachment.html
Geometry list run by mateusz at loskot.net