|
Boost : |
Subject: Re: [boost] [move][container] Review Request (new versions of Boost.Move and Boost.Container in sandbox and vault)
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2009-08-24 12:04:18
2009/8/24 Ion Gaztañaga <igaztanaga_at_[hidden]>
> Gottlob Frege escribió:
>
>> Is stable_vector somewhat similar to that? Or what is the data structure
>> of
>> stable_vector? (Sorry I haven't dug into the code yet to find out - I
>> think
>> it would be nice to mention it in the docs, even if the implementation is
>> suppose to be hidden and separate from the requirements.)
>> Tony
>>
>
> Joaquín wrote the original stable_vector, read hits post:
>
> http://bannalia.blogspot.com/2008/09/introducing-stablevector.html
>
> the internal structure is a vector of pointers pointing to heap-allocated
> nodes. The advantage is that iterator are stable (it's a node-based
> container) and you get random-access using the auxiliar pointer array.
>
> Best,
>
> Ion
>
So very similar. I just 'allocate' from a vector instead of the heap. Which
keeps everything together in memory.
ie: I see the standard is now going to have a definition of contiguous:
&v[n] == &v[0] + n for all 0 <= n < v.size()
To me that is "ordered contiguity". I usually find all I really need is
"unordered contiguity":
for all 0 <= n < v.size()
there exists an m with 0 <= m <= v.size() such that
&v[n] == &v[0] + m
What should that be called? 'locality' ?
Tony
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk