Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multi-Index] Categorised Container
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2011-05-02 06:24:56


Hossein Haeri <powerprogman <at> yahoo.com> writes:

>
> Hi Joaquín,
>
> > Now, if you do an equal_range on a category elements will indeed be
> > sorted by the second member.
>
> Right. Here is a better formulated question then: Let's say c1 is an
> object of type category_t. When I apply equal_range for c1, will I get
> my desired range in log(n) time (where n == my_container.size())? Or,
> will I get it in O(1) for the elements are already stored in
> a category-by-category manner?

You'll get the range in O(log n), I'm afraid.

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


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