A fast read and batch-write map-style collection. More...
#include <vbl_batch_compact_multimap.h>
Classes | |
| class | input_compare |
| A comparator to sort input data, by ignoring the value in pair<key, value>. More... | |
Public Types | |
| typedef K | key_type |
| typedef T | value_type |
| typedef std::pair< key_type, value_type > | input_type |
| The type of data in the inputted sequence. More... | |
| typedef C | key_compare |
| typedef unsigned | index_type |
| typedef std::vector< key_type > | key_container_type |
| typedef std::vector< index_type > | index_container_type |
| typedef std::vector< value_type > | value_container_type |
| typedef key_container_type::const_iterator | const_key_iterator |
| typedef value_container_type::const_iterator | const_value_iterator |
Public Member Functions | |
| vbl_batch_compact_multimap ()=default | |
| template<typename CI > | |
| vbl_batch_compact_multimap (CI start, CI finish) | |
| template<typename CI > | |
| void | assign (CI start, CI finish) |
| Change all the values in the multimap. More... | |
| template<typename CI > | |
| void | assign_sorted (CI start, CI finish) |
| Change all the values in the multimap, to a ready sorted sequence. More... | |
| void | swap (vbl_batch_compact_multimap &x) |
| bool | operator== (const vbl_batch_compact_multimap &rhs) |
| const_key_iterator | keys_begin () const |
| const_key_iterator | keys_end () const |
| const_value_iterator | values_begin () const |
| const_value_iterator | values_end () const |
| bool | empty () const |
| std::size_t | size () const |
| const_value_iterator | lower_bound (const key_type &x) const |
Finds the beginning of a subsequence of values whose key matches given x. More... | |
| const_value_iterator | upper_bound (const key_type &x) const |
Finds the one past the end of a subsequence of values whose key matches given x. More... | |
| std::pair< const_value_iterator, const_value_iterator > | equal_range (const key_type &x) const |
| A more efficient make_pair(lower_bound(...), upper_bound(...)). More... | |
| const_value_iterator | find (const key_type &x) const |
Finds the first value with key matching x, or returns values_end() if no match,. More... | |
| std::size_t | count (const key_type &x) const |
Finds the number of values matching key x,. More... | |
Protected Types | |
| typedef std::vector< input_type > | input_container_type |
| The type of container used internally to process inputted data. More... | |
Private Member Functions | |
| template<typename CI , typename CMP > | |
| bool | is_sorted (CI start, CI end, CMP comp) |
Private Attributes | |
| key_container_type | keys_ |
| index_container_type | indices_ |
| value_container_type | values_ |
A fast read and batch-write map-style collection.
This container stores its keys separately from its values, and has fast construction and deletion. It has all the const-access map fundtions, but its contents can only be modified all-at-once. You can not get a key,value pair, but you can get access to all the compactly-stored values for a given key.
Definition at line 27 of file vbl_batch_compact_multimap.h.
| typedef key_container_type::const_iterator vbl_batch_compact_multimap< K, T, C >::const_key_iterator |
Definition at line 40 of file vbl_batch_compact_multimap.h.
| typedef value_container_type::const_iterator vbl_batch_compact_multimap< K, T, C >::const_value_iterator |
Definition at line 41 of file vbl_batch_compact_multimap.h.
| typedef std::vector<index_type> vbl_batch_compact_multimap< K, T, C >::index_container_type |
Definition at line 37 of file vbl_batch_compact_multimap.h.
| typedef unsigned vbl_batch_compact_multimap< K, T, C >::index_type |
Definition at line 35 of file vbl_batch_compact_multimap.h.
|
protected |
The type of container used internally to process inputted data.
Definition at line 45 of file vbl_batch_compact_multimap.h.
| typedef std::pair<key_type, value_type> vbl_batch_compact_multimap< K, T, C >::input_type |
The type of data in the inputted sequence.
Definition at line 33 of file vbl_batch_compact_multimap.h.
| typedef C vbl_batch_compact_multimap< K, T, C >::key_compare |
Definition at line 34 of file vbl_batch_compact_multimap.h.
| typedef std::vector<key_type> vbl_batch_compact_multimap< K, T, C >::key_container_type |
Definition at line 36 of file vbl_batch_compact_multimap.h.
| typedef K vbl_batch_compact_multimap< K, T, C >::key_type |
Definition at line 30 of file vbl_batch_compact_multimap.h.
| typedef std::vector<value_type> vbl_batch_compact_multimap< K, T, C >::value_container_type |
Definition at line 38 of file vbl_batch_compact_multimap.h.
| typedef T vbl_batch_compact_multimap< K, T, C >::value_type |
Definition at line 31 of file vbl_batch_compact_multimap.h.
|
default |
|
inline |
Definition at line 65 of file vbl_batch_compact_multimap.h.
|
inline |
Change all the values in the multimap.
Definition at line 74 of file vbl_batch_compact_multimap.h.
|
inline |
Change all the values in the multimap, to a ready sorted sequence.
The input values must already be sorted on their v.first members.
Definition at line 84 of file vbl_batch_compact_multimap.h.
|
inline |
Finds the number of values matching key x,.
Definition at line 184 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 124 of file vbl_batch_compact_multimap.h.
|
inline |
A more efficient make_pair(lower_bound(...), upper_bound(...)).
Definition at line 152 of file vbl_batch_compact_multimap.h.
|
inline |
Finds the first value with key matching x, or returns values_end() if no match,.
Definition at line 172 of file vbl_batch_compact_multimap.h.
|
inlineprivate |
Definition at line 201 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 120 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 121 of file vbl_batch_compact_multimap.h.
|
inline |
Finds the beginning of a subsequence of values whose key matches given x.
x, or the next greatest element if no match is found. Definition at line 132 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 111 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 125 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 104 of file vbl_batch_compact_multimap.h.
|
inline |
Finds the one past the end of a subsequence of values whose key matches given x.
key, or to the next greatest element if no match is found. Definition at line 143 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 122 of file vbl_batch_compact_multimap.h.
|
inline |
Definition at line 123 of file vbl_batch_compact_multimap.h.
|
private |
Definition at line 197 of file vbl_batch_compact_multimap.h.
|
private |
Definition at line 196 of file vbl_batch_compact_multimap.h.
|
private |
Definition at line 198 of file vbl_batch_compact_multimap.h.
1.8.15