Vector that stores values on the stack if size is smaller than MAX_STACK. More...
#include <fast_sequence.hxx>
Public Types | |
typedef T | ValueType |
typedef T | value_type |
typedef T const * | ConstIteratorType |
typedef T const * | const_iterator |
typedef T * | IteratorType |
typedef T * | iterator |
Public Member Functions | |
FastSequence () | |
constructor | |
FastSequence (const size_t) | |
constructor | |
FastSequence (const size_t, const T &) | |
constructor | |
FastSequence (const FastSequence< T, MAX_STACK > &) | |
copy constructor | |
~FastSequence () | |
destructor | |
FastSequence< T, MAX_STACK > & | operator= (const FastSequence< T, MAX_STACK > &) |
assignment operator | |
template<class ITERATOR > | |
void | assign (ITERATOR, ITERATOR) |
assign values | |
size_t | size () const |
size | |
T const * | begin () const |
begin iterator | |
T const * | end () const |
end iterator | |
T *const | begin () |
begin iterator | |
T *const | end () |
end iterator | |
T const & | operator[] (const size_t) const |
access entries | |
T & | operator[] (const size_t) |
access entries | |
void | push_back (const T &) |
append a value | |
void | resize (const size_t) |
resize the sequence | |
void | reserve (const size_t) |
reserve memory | |
void | clear () |
clear the sequence | |
bool | empty () const |
query if the sequence is empty | |
const T & | front () const |
reference to the first entry | |
const T & | back () const |
reference to the last entry | |
T & | front () |
reference to the first entry | |
T & | back () |
reference to the last entry |
Vector that stores values on the stack if size is smaller than MAX_STACK.
T | value type | |
MAX_STACK | maximum number of elements kept on the stack |
The member functions resize and clear reduce the size but not the capacity of the vector.
Definition at line 21 of file fast_sequence.hxx.
typedef T const* opengm::FastSequence< T, MAX_STACK >::const_iterator |
Definition at line 26 of file fast_sequence.hxx.
typedef T const* opengm::FastSequence< T, MAX_STACK >::ConstIteratorType |
Definition at line 25 of file fast_sequence.hxx.
typedef T* opengm::FastSequence< T, MAX_STACK >::iterator |
Definition at line 28 of file fast_sequence.hxx.
typedef T* opengm::FastSequence< T, MAX_STACK >::IteratorType |
Definition at line 27 of file fast_sequence.hxx.
typedef T opengm::FastSequence< T, MAX_STACK >::value_type |
Definition at line 24 of file fast_sequence.hxx.
typedef T opengm::FastSequence< T, MAX_STACK >::ValueType |
Definition at line 23 of file fast_sequence.hxx.
opengm::FastSequence< T, MAX_STACK >::FastSequence | ( | ) | [inline] |
constructor
Definition at line 64 of file fast_sequence.hxx.
opengm::FastSequence< T, MAX_STACK >::FastSequence | ( | const size_t | size | ) | [inline] |
constructor
size | length of the sequence |
Definition at line 75 of file fast_sequence.hxx.
opengm::FastSequence< T, MAX_STACK >::FastSequence | ( | const size_t | size, | |
const T & | value | |||
) | [inline] |
constructor
size | lenght of the sequence | |
value | initial value |
Definition at line 95 of file fast_sequence.hxx.
opengm::FastSequence< T, MAX_STACK >::FastSequence | ( | const FastSequence< T, MAX_STACK > & | other | ) | [inline] |
copy constructor
other | container to copy |
Definition at line 116 of file fast_sequence.hxx.
opengm::FastSequence< T, MAX_STACK >::~FastSequence | ( | ) | [inline] |
destructor
Definition at line 135 of file fast_sequence.hxx.
void opengm::FastSequence< T, MAX_STACK >::assign | ( | ITERATOR | begin, | |
ITERATOR | end | |||
) | [inline] |
assign values
begin | begin iterator | |
end | end iterator |
Definition at line 342 of file fast_sequence.hxx.
T & opengm::FastSequence< T, MAX_STACK >::back | ( | ) | [inline] |
reference to the last entry
Definition at line 357 of file fast_sequence.hxx.
const T & opengm::FastSequence< T, MAX_STACK >::back | ( | ) | const [inline] |
reference to the last entry
Definition at line 350 of file fast_sequence.hxx.
T *const opengm::FastSequence< T, MAX_STACK >::begin | ( | ) | [inline] |
begin iterator
Definition at line 204 of file fast_sequence.hxx.
T const * opengm::FastSequence< T, MAX_STACK >::begin | ( | ) | const [inline] |
begin iterator
Definition at line 188 of file fast_sequence.hxx.
void opengm::FastSequence< T, MAX_STACK >::clear | ( | ) | [inline] |
clear the sequence
Definition at line 316 of file fast_sequence.hxx.
bool opengm::FastSequence< T, MAX_STACK >::empty | ( | ) | const [inline] |
query if the sequence is empty
Definition at line 332 of file fast_sequence.hxx.
T *const opengm::FastSequence< T, MAX_STACK >::end | ( | ) | [inline] |
end iterator
Definition at line 212 of file fast_sequence.hxx.
T const * opengm::FastSequence< T, MAX_STACK >::end | ( | ) | const [inline] |
end iterator
Definition at line 196 of file fast_sequence.hxx.
T & opengm::FastSequence< T, MAX_STACK >::front | ( | ) | [inline] |
reference to the first entry
Definition at line 371 of file fast_sequence.hxx.
const T & opengm::FastSequence< T, MAX_STACK >::front | ( | ) | const [inline] |
reference to the first entry
Definition at line 364 of file fast_sequence.hxx.
FastSequence< T, MAX_STACK > & opengm::FastSequence< T, MAX_STACK >::operator= | ( | const FastSequence< T, MAX_STACK > & | other | ) | [inline] |
assignment operator
other | container to copy |
Definition at line 146 of file fast_sequence.hxx.
T & opengm::FastSequence< T, MAX_STACK >::operator[] | ( | const size_t | index | ) | [inline] |
access entries
Definition at line 233 of file fast_sequence.hxx.
T const & opengm::FastSequence< T, MAX_STACK >::operator[] | ( | const size_t | index | ) | const [inline] |
access entries
Definition at line 221 of file fast_sequence.hxx.
void opengm::FastSequence< T, MAX_STACK >::push_back | ( | const T & | value | ) | [inline] |
append a value
value | value to append |
Definition at line 245 of file fast_sequence.hxx.
void opengm::FastSequence< T, MAX_STACK >::reserve | ( | const size_t | size | ) | [inline] |
reserve memory
size | new size of the container |
Definition at line 294 of file fast_sequence.hxx.
void opengm::FastSequence< T, MAX_STACK >::resize | ( | const size_t | size | ) | [inline] |
resize the sequence
size | new size of the container |
Definition at line 270 of file fast_sequence.hxx.
size_t opengm::FastSequence< T, MAX_STACK >::size | ( | ) | const [inline] |