|
Geometry : |
Subject: [ggl] spacial index construction interface
From: Barend Gehrels (barend)
Date: 2011-03-09 14:27:36
Hi Adam,
On 9-3-2011 20:12, Adam Wulkiewicz wrote:
>
> Yes, rtree must be dynamic. Yes, code should be redesigned.
>
> To keep it short, this is what it should be done:
>
> 1.
> - leave current nodes hierarchy (node, internal_node, leaf),
> - remove as much virtual functions as possible, functionalities of
> specific type of node will be implemented in this node's class only,
> - use visitors instead of virtual functions to reduce vtable to minimum.
OK
>
> 2.
> - replace shared_ptr(s) with simple pointers,
IMO it should be a std::vector<node>, so no pointer at all. Replacing
them with simple pointer does not help the problem. The shared_ptr is
not the problem, but the pointer.
> - replace memory allocation done by operator new with some allocator
> (std::allocator by default).
Using a std::vector keeps all memory allocation from the library itself.
So this is not necessary (again, if I'm right).
Is this OK?
>
> 3.
> - remove equals() from translator, since it should just translate from
> Value to Indexable and define operator== for geometry::point,
> geometry::box.
I see many equals functions in the translator folder. Which do you refer
to now?
Thanks, Barend
-- Barend Gehrels http://about.me/barendgehrels
Geometry list run by mateusz at loskot.net