Re: [Boost-users] [Multi-Index] Categorised Container

Hi Joaquín,
multi_index_conainer< T, ordered_non_unique< composite_key< T, member
, member > >, 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

Hossein Haeri
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
participants (2)
-
Hossein Haeri
-
Joaquin M Lopez Munoz