Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multi-Index] Categorised Container
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2011-05-01 17:48:19


Hi Joaquín,

>   multi_index_conainer<
>     T,
>     ordered_non_unique<
>       composite_key<
>         T,
>         member<T,category_t,&T::category>,
>         member<T,second_type,&T::second>
>       >
>     >,
>     ordered_non_unique<...>
>   > my_container;
>
> 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?

TIA,
--Hossein


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