cgv
|
Extension of a standard map container that allows easy retreival of lower and upper bounds given a key. More...
#include <interval_map.h>
Public Types | |
using | base_type = std::map< Key, T > |
using | key_type = Key |
using | mapped_type = T |
using | value_type = typename base_type::value_type |
using | size_type = typename base_type::size_type |
using | iterator = typename base_type::iterator |
using | const_iterator = typename base_type::const_iterator |
using | reverse_iterator = typename base_type::reverse_iterator |
using | const_reverse_iterator = typename base_type::const_reverse_iterator |
Public Member Functions | |
void | clear () |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
size_type | size () const |
bool | empty () const |
std::pair< iterator, bool > | insert (key_type key, const mapped_type &value) |
size_type | erase (key_type frame) |
iterator | erase (iterator it) |
iterator | find (key_type key) |
iterator | lower_bound (key_type key) |
Returns an iterator pointing to the first element in the container whose key is equivalent or smaller than the given key. If no such element exists, returns end(). | |
const_iterator | lower_bound (key_type key) const |
Returns a const iterator pointing to the first element in the container whose key is equivalent or smaller than the given key. If no such element exists, returns end(). | |
iterator | upper_bound (key_type key) |
Returns an iterator pointing to the first element in the container whose key is greater than the given key. If no such element exists, returns end(). | |
const_iterator | upper_bound (key_type key) const |
Returns a const iterator pointing to the first element in the container whose key is greater than the given key. If no such element exists, returns end(). | |
std::pair< iterator, iterator > | bounds (key_type key) |
Returns a pair of iterators pointing to the lower and upper bounds of the given key. | |
std::pair< const_iterator, const_iterator > | bounds (key_type key) const |
Returns a pair of const iterators pointing to the lower and upper bounds of the given key. | |
Extension of a standard map container that allows easy retreival of lower and upper bounds given a key.
Key | the key type |
T | the value type |
Definition at line 12 of file interval_map.h.
using cgv::data::interval_map< Key, T >::base_type = std::map<Key, T> |
Definition at line 14 of file interval_map.h.
using cgv::data::interval_map< Key, T >::const_iterator = typename base_type::const_iterator |
Definition at line 20 of file interval_map.h.
using cgv::data::interval_map< Key, T >::const_reverse_iterator = typename base_type::const_reverse_iterator |
Definition at line 22 of file interval_map.h.
using cgv::data::interval_map< Key, T >::iterator = typename base_type::iterator |
Definition at line 19 of file interval_map.h.
using cgv::data::interval_map< Key, T >::key_type = Key |
Definition at line 15 of file interval_map.h.
using cgv::data::interval_map< Key, T >::mapped_type = T |
Definition at line 16 of file interval_map.h.
using cgv::data::interval_map< Key, T >::reverse_iterator = typename base_type::reverse_iterator |
Definition at line 21 of file interval_map.h.
using cgv::data::interval_map< Key, T >::size_type = typename base_type::size_type |
Definition at line 18 of file interval_map.h.
using cgv::data::interval_map< Key, T >::value_type = typename base_type::value_type |
Definition at line 17 of file interval_map.h.
|
inline |
Definition at line 44 of file interval_map.h.
|
inline |
Definition at line 46 of file interval_map.h.
|
inline |
Returns a pair of iterators pointing to the lower and upper bounds of the given key.
The lower bound is defined as the greatest stored key less than or equal to the given key. The upper bound is defined as the smallest stored key greater than the given key.
Definition at line 126 of file interval_map.h.
References cgv::data::interval_map< Key, T >::lower_bound(), and cgv::data::interval_map< Key, T >::upper_bound().
|
inline |
Returns a pair of const iterators pointing to the lower and upper bounds of the given key.
The lower bound is defined as the greatest stored key less than or equal to the given key. The upper bound is defined as the smallest stored key greater than the given key.
Definition at line 134 of file interval_map.h.
References cgv::data::interval_map< Key, T >::lower_bound(), and cgv::data::interval_map< Key, T >::upper_bound().
|
inline |
Definition at line 60 of file interval_map.h.
|
inline |
Definition at line 62 of file interval_map.h.
|
inline |
Definition at line 42 of file interval_map.h.
|
inline |
Definition at line 64 of file interval_map.h.
|
inline |
Definition at line 66 of file interval_map.h.
|
inline |
Definition at line 73 of file interval_map.h.
|
inline |
Definition at line 48 of file interval_map.h.
|
inline |
Definition at line 50 of file interval_map.h.
|
inline |
Definition at line 88 of file interval_map.h.
|
inline |
Definition at line 83 of file interval_map.h.
|
inline |
Definition at line 93 of file interval_map.h.
|
inline |
Definition at line 78 of file interval_map.h.
|
inline |
Returns an iterator pointing to the first element in the container whose key is equivalent or smaller than the given key. If no such element exists, returns end().
Definition at line 99 of file interval_map.h.
References cgv::base::action::end().
Referenced by cgv::data::interval_map< Key, T >::bounds(), and cgv::data::interval_map< Key, T >::bounds().
|
inline |
Returns a const iterator pointing to the first element in the container whose key is equivalent or smaller than the given key. If no such element exists, returns end().
Definition at line 106 of file interval_map.h.
|
inline |
Definition at line 52 of file interval_map.h.
|
inline |
Definition at line 54 of file interval_map.h.
|
inline |
Definition at line 56 of file interval_map.h.
|
inline |
Definition at line 58 of file interval_map.h.
|
inline |
Definition at line 68 of file interval_map.h.
|
inline |
Returns an iterator pointing to the first element in the container whose key is greater than the given key. If no such element exists, returns end().
Definition at line 112 of file interval_map.h.
Referenced by cgv::data::interval_map< Key, T >::bounds(), and cgv::data::interval_map< Key, T >::bounds().
|
inline |
Returns a const iterator pointing to the first element in the container whose key is greater than the given key. If no such element exists, returns end().
Definition at line 118 of file interval_map.h.