Sierra Toolkit
Version of the Day
|
Vector-based std::set functionality. More...
#include <VecSet.hpp>
Public Member Functions | |
vecset (const vecset< Key, Compare > &rhs) | |
vecset< Key, Compare > & | operator= (const vecset< Key, Compare > &rhs) |
void | swap (vecset< Key, Compare > &v) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
bool | empty () const |
size_type | size () const |
size_type | max_size () const |
iterator | lower_bound (const_key_type &k) |
const_iterator | lower_bound (const_key_type &k) const |
iterator | upper_bound (const_key_type &k) |
const_iterator | upper_bound (const_key_type &k) const |
std::pair< iterator, bool > | insert (const value_type &v) |
void | erase (iterator i) |
void | erase (iterator first, iterator last) |
size_type | erase (const_key_type &k) |
void | clear () |
key_compare | key_comp () const |
value_compare | value_comp () const |
iterator | find (const_key_type &k) |
const_iterator | find (const_key_type &k) const |
size_type | count (const_key_type &k) const |
operator const storage & () const | |
void | reserve (size_type n) |
bool | operator== (const vecset< Key, Compare > &rhs) const |
bool | operator!= (const vecset< Key, Compare > &rhs) const |
Vector-based std::set functionality.
This template class mimics the 'std::set' associative container interface; however, its semantics are significantly different. Storage for the set-lite class is provided by the std::vector class where the entries are sorted by key value.
Light weight associative container functionality for small keys and values, e.g. key = integer and value = pointer.
Modifications to the vecset contents are linear complexity in violation of the associative container requirement for logarithmic complexity. Furthermore, modification operations are guaranteed to invalidate all iterators after the insert/erase point. Insertion operations may also invalidate all iterators if the storage is reallocated.
All non-modifying query operations conform to either the constant or logarithmic complexity.
Definition at line 59 of file VecSet.hpp.