The Boost Multi-index Containers Library provides a class template named multi_index_container which enables the construction of containers maintaining one or more indices with different sorting and access semantics. Indices provide interfaces similar to those of STL containers, making using them familiar. The concept of multi-indexing over the same collection of elements is borrowed from relational database terminology and allows for the specification of complex data structures in the spirit of multiply indexed relational tables where simple sets and maps are not enough. A wide selection of indices is provided, modeled after analogous STL containers like std::set, std::list and hashed sets.
Boost.MultiIndex features additional functionalities, like subobject searching, range querying and in-place updating of elements, which make it a convenient replacement for std::set and set::multiset even when no multi-indexing capabilities are needed.
The versatile nature of Boost.MultiIndex allows for the specification of a wide spectrum of different data structures. The following are possible examples of use developed in the documentation:
Lists with fast lookup and/or without duplicates.
Bidirectional maps, i.e. maps searchable either for key or value.
MRU (most recently used) lists, structures keeping the n last referenced items, beginning with the newest ones.
Emulations of standard containers taking advantage of the extra functionalities provided by Boost.MultiIndex.
© Copyright 2003-2006 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file License.html or copy at http://www.boost.org/LICENSE_1_0.txt) |