Boost Users :
From: nicola (vitacolo_at_[hidden])
Date: 2007-04-05 05:11:28
"Gottlob Frege" <gottlobfrege_at_[hidden]> wrote:
> On 4/4/07, nicola <vitacolo_at_[hidden]> wrote:
> > Hi,
> > I would like an arbitrarily nested data structure, e.g. similar to
> > std::vector< std::list<int> >, giving access to the elements of any of
> > its subcontainers, but, at the same time, being a model of Container -
> > in particular, having an iterator over all the elements in the last
> > nesting level (int's in the previous example). Space/time efficiency is
> > very important in my application.
> > Nicola
> Depending on why you need to have nested containers in the first
> place, you might want to look at Boost MultiIndex. It might be able
> to replace your nested containers completely.
Thanks, I will take a deeper look at MultiIndex.
My goal is to manage a partition of a collection of elements. The
requirements are fast insertion/deletion into each class of the
partition and fast iteration over both the elements of a single class
and over all the elements of the collection (that must be amenable to be
treated as a Container). Besides, in some cases, it may be convenient to
maintain the elements within a class (not the whole collection) sorted
by some key.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net