Boost logo

Boost :

Subject: Re: [boost] [MultiIndex] Random Access mental model?
From: JOAQUIN M. LOPEZ MUÑOZ (joaquin_at_[hidden])
Date: 2008-11-01 11:13:30


________________________________________
De: boost-bounces_at_[hidden] [boost-bounces_at_[hidden]] En nombre de David Abrahams [dave_at_[hidden]]
Enviado el: sábado, 01 de noviembre de 2008 14:08
Para: boost_at_[hidden]
Asunto: Re: [boost] [MultiIndex] Random Access mental model?

on Fri Oct 31 2008, David Abrahams <dave-AT-boostpro.com> wrote:

> Actually, MultiIndex could give me *almost* everything I need by
> threading a singly-linked list through the hash nodes (instead of
> doubly-linked). That's enough for a FIFO queue.

You can do that with Boost.Intrusive, and that will indeed save you
one pointer per node as compared with the Boost.MultiIndex-based
solution. If you're resorting to manually combining a hash_map and
a slist<pointer> then you'd begaining nothing, as in the hash_map+
deque<pointer> case described in my previous post.

> Turns out I need a little more than that; I essentially need a bool that
> tells me whether the node is in the FIFO queue yet. Since I can use a
> NULL queue pointer for that purpose, it looks like I'll be rolling my
> own.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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