libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
#include <multimap.hpp>
Public Types | |
typedef _Cont | base_container |
typedef base_container::allocator_type | allocator_type |
typedef _Key | key_type |
typedef _Pred | key_compare |
typedef const key_type | value_type |
typedef base_container::difference_type | difference_type |
typedef base_container::reference | reference |
typedef base_container::const_reference | const_reference |
typedef base_container::size_type | size_type |
typedef base_container::const_iterator | const_iterator |
typedef base_container::iterator | iterator |
typedef base_container::reverse_iterator | reverse_iterator |
typedef base_container::const_reverse_iterator | const_reverse_iterator |
typedef std::pair< iterator, bool > | InsertItr_ |
This collection implementation is efficient when the inserts()
to the collection come in blocks, then the lookups (find()
or operator[]()
) in blocks, then the inserts()
again. This is because the collection only sorts itself when it is unsorted and a lookup occurs. Non-unique keys are allowed, and the groups of non-unique keys are adjacent (after sorting) then the range of the "unique" key is multiple values.
The complexity is (assuming default container of std::vector
, which affects these complexities):
std::vector
or std:list
. The choice will affect the complexities above. The advantage of std::vector
over std::list
is locality of reference: The data elements are guaranteed to be local to each other, unlike std::list
. Alternatively std:list
has better complexity than std::vector
for some of the operations. Choose wisely. Definition at line 179 of file multimap.hpp.
typedef base_container::allocator_type jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::allocator_type |
Definition at line 182 of file multimap.hpp.
typedef _Cont jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::base_container |
Definition at line 181 of file multimap.hpp.
typedef base_container::const_iterator jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::const_iterator |
Definition at line 190 of file multimap.hpp.
typedef base_container::const_reference jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::const_reference |
Definition at line 188 of file multimap.hpp.
typedef base_container::const_reverse_iterator jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::const_reverse_iterator |
Definition at line 193 of file multimap.hpp.
typedef base_container::difference_type jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::difference_type |
Definition at line 186 of file multimap.hpp.
typedef std::pair<iterator,bool> jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::InsertItr_ |
Definition at line 194 of file multimap.hpp.
typedef base_container::iterator jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::iterator |
Definition at line 191 of file multimap.hpp.
typedef _Pred jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::key_compare |
Definition at line 184 of file multimap.hpp.
typedef _Key jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::key_type |
Definition at line 183 of file multimap.hpp.
typedef base_container::reference jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::reference |
Definition at line 187 of file multimap.hpp.
typedef base_container::reverse_iterator jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::reverse_iterator |
Definition at line 192 of file multimap.hpp.
typedef base_container::size_type jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::size_type |
Definition at line 189 of file multimap.hpp.
typedef const key_type jmmcg::LIBJMMCG_VER_NAMESPACE::rapid_insert_lookup::multiset< _Key, _Pred, _Cont >::value_type |
Definition at line 185 of file multimap.hpp.
|
inlineexplicit |
Definition at line 291 of file multimap_impl.hpp.
|
inline |
Definition at line 296 of file multimap_impl.hpp.
|
inline |
Definition at line 301 of file multimap_impl.hpp.
|
inline |
Definition at line 306 of file multimap_impl.hpp.
|
inline |
Definition at line 311 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 334 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 342 of file multimap_impl.hpp.
|
inline |
Definition at line 413 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 408 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 366 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 374 of file multimap_impl.hpp.
|
inline |
Erase: O(n).
Definition at line 464 of file multimap_impl.hpp.
|
inline |
Erase: O(n).
Definition at line 469 of file multimap_impl.hpp.
|
inline |
Erase: O(nlog(n)). All keys with same value are erased. Collection remains sorted.
Definition at line 500 of file multimap_impl.hpp.
|
inline |
Lookup: O(log(n)+(complexity of sorting a vector)), if unsorted, O(log(n)) if sorted, irrespective if the element is in the multiset or not. Are guaranteed to return the first key if they are not unique in the multiset.
Definition at line 514 of file multimap_impl.hpp.
|
inline |
Lookup: O(log(n)+(complexity of sorting a vector)), if unsorted, O(log(n)) if sorted, irrespective if the element is in the multiset or not. Are guaranteed to return the first key if they are not unique in the multiset.
Definition at line 528 of file multimap_impl.hpp.
|
inline |
Definition at line 435 of file multimap_impl.hpp.
|
inline |
Insert: (with insert()
) constant time. (But unsorts the multiset.) Allows the insertion of multiple keys with the same value.
Definition at line 457 of file multimap_impl.hpp.
|
inline |
Insert: (with insert()
) constant time. (But unsorts the multiset.) Allows the insertion of multiple keys with the same value.
Definition at line 449 of file multimap_impl.hpp.
|
inline |
Insert: (with insert()
) constant time. (But unsorts the multiset.) Allows the insertion of multiple keys with the same value.
Definition at line 440 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 403 of file multimap_impl.hpp.
|
inline |
Definition at line 315 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 350 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 358 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 382 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 390 of file multimap_impl.hpp.
|
inline |
Definition at line 427 of file multimap_impl.hpp.
|
inline |
Definition at line 419 of file multimap_impl.hpp.
|
inlinenoexcept |
Definition at line 398 of file multimap_impl.hpp.