Boost logo

Boost :

Subject: Re: [boost] Proposal: Linear map
From: Ben Pope (benpope81_at_[hidden])
Date: 2012-07-17 04:15:45


On Tuesday, July 17, 2012 03:13 PM, Amir Ansari wrote:
> Hi,
>
> In my work I have repeatedly had the need to create a sorted array in which I can insert/lookup from using a key. This is like a map except that it uses an array. The contention is that in some cases, it is faster to insert/remove from a sorted array rather than traversing a tree (the underlying data structure for a map) which involves pointer de-referencing. I would like to call the class linear_map. Looking forward to feedback from everyone.

Does it differ from boost::flat_map:

http://www.boost.org/doc/libs/1_50_0/doc/html/boost/container/flat_map.html

Ben


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk