Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2005-12-22 06:29:05


Neil Hunt ha escrito:

> Joaquín Mª López Muñoz wrote:
> > Thinking out loud, the "some fixed, some dynamic indices" situation
> > can be handled in a number of ways:
> > 2. Using a random access index for supporting the dynamic columns.
> > The index can be sorted according to the current column. You can
> > already try this approach, there's a preview of random access
> > indices in the vault.
> I don't understand how the random access part of the index helps with
> laziness.

The idea is that a sorted random access index can serve as a manual
replacement for an ordered index, much like sorted std::vectors are
sometimes suggested as an alternative to std::multisets. Random access
allows you to efficiently lookup elements with binary search (once the
index is sorted, of course.) Colum change can be implemented in a
straightforward manner just by appropriately resorting the ra-index.
Alas you lose autoupdate --or more precisely, autosort..

> But I can appreciate the operator[] facility for what I am doing.

I've got the hunch you'll find much more useful to have operator[] in
*ordered* indices. This is what ranked indices (see future work) will
eventually provide.

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