Boost logo

Geometry :

Subject: [ggl] spacial index construction interface
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2011-03-09 14:53:30


Barend Gehrels wrote:
>> 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?

Yes, I like it. Just see my second email. But the node must contain all
data used by internal nodes and leafs.

>> 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?

As Bruno has written translator should only translate from Value to
Indexable. Values should have operator== defined. equals() inside the
translator isn't needed. But I didn't see operator== defined for
geometry::point and geometry::box so this should be defined. If there is
one, sorry.

Regards,
Adam


Geometry list run by mateusz at loskot.net