[multi_index] composite_key question
I've a multi_index container that has a composite_key index which is used to express a "checker board" like concept. I need to iterator over all rows, from 0 to n. I know how to employ equal_range(make_tuple(y)) to get the elements within a specific row, but how do I determine n? The only way I can think of doing this is doing a linear search using another index. Is there a better way?
Hi!
May be you would like to add to your multi-index container a random access
policy which will also remember the order of the elements being added.
With Kind Regards,
Ovanes Markarian
On 9/20/07, Jeffrey Holle
I've a multi_index container that has a composite_key index which is used to express a "checker board" like concept.
I need to iterator over all rows, from 0 to n. I know how to employ equal_range(make_tuple(y)) to get the elements within a specific row, but how do I determine n?
The only way I can think of doing this is doing a linear search using another index. Is there a better way?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Jeffrey
----- Mensaje original -----
De: Jeffrey Holle
I've a multi_index container that has a composite_key index which is used to express a "checker board" like concept.
I need to iterator over all rows, from 0 to n. I know how to employ equal_range(make_tuple(y)) to get the elements within a specific row, but how do I determine n?
The only way I can think of doing this is doing a linear search using another index. Is there a better way?
I'm sorry but I'm afraid I'm not getting your question at all. What do you mean by "checker board concept"? Could you post the definition of your multi_index_container, or a simplified version of it? Thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo PS: What happened with http://lists.boost.org/boost-users/2007/09/30804.php ?
participants (3)
-
"JOAQUIN LOPEZ MU?Z"
-
Jeffrey Holle
-
Ovanes Markarian