set with O(n) insert and O(1) access More...
#include <randomaccessset.hxx>
Public Types | |
typedef Key | key_type |
key type of the set | |
typedef Key | ValueType |
value type of the set | |
typedef Key | value_type |
value type of the set | |
typedef Compare | key_compare |
comperator | |
typedef Compare | value_compare |
value comperator | |
typedef Alloc | allocator_type |
acclocator | |
typedef Alloc::const_reference | const_reference |
const reference type | |
typedef VectorType::iterator | iterator |
iterator type | |
typedef VectorType::const_iterator | const_iterator |
const iterator type | |
typedef VectorType::size_type | size_type |
size type | |
typedef VectorType::difference_type | difference_type |
difference type | |
typedef VectorType::const_pointer | const_pointer |
const pointer type | |
typedef VectorType::const_reverse_iterator | const_reverse_iterator |
const reverse iterator | |
Public Member Functions | |
RandomAccessSet (const size_t, const Compare &compare=Compare(), const Alloc &alloc=Alloc()) | |
constructor | |
RandomAccessSet (const Compare &compare=Compare(), const Alloc &alloc=Alloc()) | |
constructor | |
template<class InputIterator > | |
RandomAccessSet (InputIterator, InputIterator, const Compare &compare=Compare(), const Alloc &alloc=Alloc()) | |
constructor | |
RandomAccessSet (const RandomAccessSet &) | |
copy constructor | |
RandomAccessSet & | operator= (const RandomAccessSet &) |
assignment operator | |
const value_type & | operator[] (const size_type) const |
const_iterator | begin () const |
const begin iterator | |
const_iterator | end () const |
const end iterator | |
const_iterator | rbegin () const |
reverse const begin iterator | |
const_iterator | rend () const |
reverse const end iterator | |
iterator | begin () |
begin iterator | |
iterator | end () |
end iterator | |
iterator | rbegin () |
reverse begin iterator | |
iterator | rend () |
reverse end iterator | |
bool | empty () const |
query if the set is empty | |
size_type | size () const |
number of elements of the set | |
size_type | max_size () const |
maximum size of the underlying container | |
std::pair< const_iterator, bool > | insert (const value_type &) |
template<class InputIterator > | |
void | insert (InputIterator, InputIterator) |
insert a sequence of elements | |
const_iterator | insert (const_iterator, const value_type &) |
void | erase (iterator position) |
size_type | erase (const key_type &) |
void | erase (const_iterator, const_iterator) |
void | swap (RandomAccessSet &) |
swap random access sets | |
void | clear () |
clear the set | |
key_compare | key_comp () const |
key comparator | |
value_compare | value_comp () const |
value comparator | |
const_iterator | find (const key_type &) const |
iterator | find (const key_type &) |
size_type | count (const key_type &) const |
const_iterator | lower_bound (const key_type &) const |
const_iterator | upper_bound (const key_type &) const |
std::pair< const_iterator, const_iterator > | equal_range (const key_type &) const |
iterator | lower_bound (const key_type &) |
iterator | upper_bound (const key_type &) |
std::pair< iterator, iterator > | equal_range (const key_type &) |
allocator_type | get_allocator () const |
allocators | |
void | reserve (const size_t size) |
size_t | capacity () const |
set with O(n) insert and O(1) access
Key | key and value type of the set | |
Alloc | allocator of the set RandomAccessSet has the same interface as std::set. In addition, there is operator[]. |
Definition at line 21 of file randomaccessset.hxx.
typedef Alloc opengm::RandomAccessSet< Key, Compare, Alloc >::allocator_type |
acclocator
Definition at line 39 of file randomaccessset.hxx.
typedef VectorType::const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::const_iterator |
const iterator type
Definition at line 45 of file randomaccessset.hxx.
typedef VectorType::const_pointer opengm::RandomAccessSet< Key, Compare, Alloc >::const_pointer |
const pointer type
Definition at line 51 of file randomaccessset.hxx.
typedef Alloc::const_reference opengm::RandomAccessSet< Key, Compare, Alloc >::const_reference |
const reference type
Definition at line 41 of file randomaccessset.hxx.
typedef VectorType::const_reverse_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::const_reverse_iterator |
const reverse iterator
Definition at line 53 of file randomaccessset.hxx.
typedef VectorType::difference_type opengm::RandomAccessSet< Key, Compare, Alloc >::difference_type |
difference type
Definition at line 49 of file randomaccessset.hxx.
typedef VectorType::iterator opengm::RandomAccessSet< Key, Compare, Alloc >::iterator |
iterator type
Definition at line 43 of file randomaccessset.hxx.
typedef Compare opengm::RandomAccessSet< Key, Compare, Alloc >::key_compare |
comperator
Definition at line 35 of file randomaccessset.hxx.
typedef Key opengm::RandomAccessSet< Key, Compare, Alloc >::key_type |
key type of the set
Definition at line 29 of file randomaccessset.hxx.
typedef VectorType::size_type opengm::RandomAccessSet< Key, Compare, Alloc >::size_type |
size type
Definition at line 47 of file randomaccessset.hxx.
typedef Compare opengm::RandomAccessSet< Key, Compare, Alloc >::value_compare |
value comperator
Definition at line 37 of file randomaccessset.hxx.
typedef Key opengm::RandomAccessSet< Key, Compare, Alloc >::value_type |
value type of the set
Definition at line 33 of file randomaccessset.hxx.
typedef Key opengm::RandomAccessSet< Key, Compare, Alloc >::ValueType |
value type of the set
Definition at line 31 of file randomaccessset.hxx.
opengm::RandomAccessSet< Key, Compare, Alloc >::RandomAccessSet | ( | const size_t | reserveSize, | |
const Compare & | compare = Compare() , |
|||
const Alloc & | alloc = Alloc() | |||
) | [inline] |
constructor
reserveSize | reserve /allocate space | |
compare | comperator | |
alloc | allocator |
Definition at line 122 of file randomaccessset.hxx.
opengm::RandomAccessSet< Key, Compare, Alloc >::RandomAccessSet | ( | const Compare & | compare = Compare() , |
|
const Alloc & | alloc = Alloc() | |||
) | [inline] |
constructor
compare | comperator allocator |
Definition at line 151 of file randomaccessset.hxx.
opengm::RandomAccessSet< Key, Compare, Alloc >::RandomAccessSet | ( | InputIterator | beginInput, | |
InputIterator | endInput, | |||
const Compare & | compare = Compare() , |
|||
const Alloc & | alloc = Alloc() | |||
) | [inline] |
constructor
InputIterator | (key/value) input iterator |
beginInput | ||
endInput |
Definition at line 167 of file randomaccessset.hxx.
opengm::RandomAccessSet< Key, Compare, Alloc >::RandomAccessSet | ( | const RandomAccessSet< Key, Compare, Alloc > & | src | ) | [inline] |
copy constructor
src | other random access set |
Definition at line 187 of file randomaccessset.hxx.
RandomAccessSet< Key, Compare, Alloc >::iterator opengm::RandomAccessSet< Key, Compare, Alloc >::begin | ( | ) | [inline] |
RandomAccessSet< Key, Compare, Alloc >::const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::begin | ( | ) | const [inline] |
size_t opengm::RandomAccessSet< Key, Compare, Alloc >::capacity | ( | ) | const [inline] |
Definition at line 106 of file randomaccessset.hxx.
void opengm::RandomAccessSet< Key, Compare, Alloc >::clear | ( | ) | [inline] |
size_type opengm::RandomAccessSet< Key, Compare, Alloc >::count | ( | const key_type & | ) | const |
bool opengm::RandomAccessSet< Key, Compare, Alloc >::empty | ( | ) | const [inline] |
RandomAccessSet< Key, Compare, Alloc >::iterator opengm::RandomAccessSet< Key, Compare, Alloc >::end | ( | ) | [inline] |
RandomAccessSet< Key, Compare, Alloc >::const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::end | ( | ) | const [inline] |
std::pair<iterator,iterator> opengm::RandomAccessSet< Key, Compare, Alloc >::equal_range | ( | const key_type & | ) |
std::pair<const_iterator,const_iterator> opengm::RandomAccessSet< Key, Compare, Alloc >::equal_range | ( | const key_type & | ) | const |
void opengm::RandomAccessSet< Key, Compare, Alloc >::erase | ( | const_iterator | , | |
const_iterator | ||||
) |
size_type opengm::RandomAccessSet< Key, Compare, Alloc >::erase | ( | const key_type & | ) |
void opengm::RandomAccessSet< Key, Compare, Alloc >::erase | ( | iterator | position | ) |
iterator opengm::RandomAccessSet< Key, Compare, Alloc >::find | ( | const key_type & | ) |
const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::find | ( | const key_type & | ) | const |
RandomAccessSet< Key, Compare, Alloc >::allocator_type opengm::RandomAccessSet< Key, Compare, Alloc >::get_allocator | ( | ) | const [inline] |
const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::insert | ( | const_iterator | , | |
const value_type & | ||||
) |
void opengm::RandomAccessSet< Key, Compare, Alloc >::insert | ( | InputIterator | first, | |
InputIterator | last | |||
) | [inline] |
insert a sequence of elements
first | iterator to the first element | |
last | iterator to the last element |
Definition at line 338 of file randomaccessset.hxx.
std::pair< const_iterator,bool> opengm::RandomAccessSet< Key, Compare, Alloc >::insert | ( | const value_type & | ) |
RandomAccessSet< Key, Compare, Alloc >::key_compare opengm::RandomAccessSet< Key, Compare, Alloc >::key_comp | ( | ) | const [inline] |
iterator opengm::RandomAccessSet< Key, Compare, Alloc >::lower_bound | ( | const key_type & | ) |
const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::lower_bound | ( | const key_type & | ) | const |
RandomAccessSet< Key, Compare, Alloc >::size_type opengm::RandomAccessSet< Key, Compare, Alloc >::max_size | ( | ) | const [inline] |
maximum size of the underlying container
Definition at line 303 of file randomaccessset.hxx.
RandomAccessSet< Key, Compare, Alloc > & opengm::RandomAccessSet< Key, Compare, Alloc >::operator= | ( | const RandomAccessSet< Key, Compare, Alloc > & | src | ) | [inline] |
assignment operator
src | other random access set |
Definition at line 199 of file randomaccessset.hxx.
const value_type& opengm::RandomAccessSet< Key, Compare, Alloc >::operator[] | ( | const | size_type | ) | const |
RandomAccessSet< Key, Compare, Alloc >::iterator opengm::RandomAccessSet< Key, Compare, Alloc >::rbegin | ( | ) | [inline] |
reverse begin iterator
reverse | begin iterator |
Definition at line 267 of file randomaccessset.hxx.
RandomAccessSet< Key, Compare, Alloc >::const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::rbegin | ( | ) | const [inline] |
reverse const begin iterator
Definition at line 231 of file randomaccessset.hxx.
RandomAccessSet< Key, Compare, Alloc >::iterator opengm::RandomAccessSet< Key, Compare, Alloc >::rend | ( | ) | [inline] |
reverse end iterator
reverse | end iterator |
Definition at line 276 of file randomaccessset.hxx.
RandomAccessSet< Key, Compare, Alloc >::const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::rend | ( | ) | const [inline] |
reverse const end iterator
reverse | end iterator |
Definition at line 240 of file randomaccessset.hxx.
void opengm::RandomAccessSet< Key, Compare, Alloc >::reserve | ( | const size_t | size | ) | [inline] |
RandomAccessSet< Key, Compare, Alloc >::size_type opengm::RandomAccessSet< Key, Compare, Alloc >::size | ( | ) | const [inline] |
number of elements of the set
Definition at line 294 of file randomaccessset.hxx.
void opengm::RandomAccessSet< Key, Compare, Alloc >::swap | ( | RandomAccessSet< Key, Compare, Alloc > & | rhs | ) | [inline] |
swap random access sets
rhs | set to swap with |
Definition at line 417 of file randomaccessset.hxx.
iterator opengm::RandomAccessSet< Key, Compare, Alloc >::upper_bound | ( | const key_type & | ) |
const_iterator opengm::RandomAccessSet< Key, Compare, Alloc >::upper_bound | ( | const key_type & | ) | const |
RandomAccessSet< Key, Compare, Alloc >::value_compare opengm::RandomAccessSet< Key, Compare, Alloc >::value_comp | ( | ) | const [inline] |