Boost logo

Geometry :

Subject: [ggl] space partitioning
From: Mateusz Loskot (mateusz)
Date: 2010-09-10 18:44:07


On 17/08/10 18:13, Simonson, Lucanus J wrote:
> Adam Wulkiewicz wrote:
>>
>> I'd rather use 1a and 2b (2e eventually but it's more
>> complicated). Although, this means that there would be e.g. vector
>> of nodes containing 1-element lists of vectors. What do you think?
>
> If we provide an iterator semantic for the interface of the tree it
> is very important to decide if the iterators are invalidated by
> operations that modify the tree (like push_back on a vector
> invalidates iterators) or not (like insert in a map does not
> invalidate iterators.) Using vectors in the leaves implies that
> iterators to the vector elements cannot be used in data structures
> returned by our interface if we are to avoid invalidating them.

push_back invalidates vector iterator only if reallocation occurs.
If reallocation doesn't occur, only end() iterator is affected.
(doubtfully) Perhaps, it would be feasible to use the advantage of these
facts.

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org

Geometry list run by mateusz at loskot.net