opengm::FastSequence< T, MAX_STACK > Class Template Reference

Vector that stores values on the stack if size is smaller than MAX_STACK. More...

#include <fast_sequence.hxx>

Collaboration diagram for opengm::FastSequence< T, MAX_STACK >:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
class opengm::FastSequence< T, MAX_STACK >

Vector that stores values on the stack if size is smaller than MAX_STACK.

Template Parameters:
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.


Member Typedef Documentation

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
typedef T const* opengm::FastSequence< T, MAX_STACK >::const_iterator

Definition at line 26 of file fast_sequence.hxx.

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
typedef T const* opengm::FastSequence< T, MAX_STACK >::ConstIteratorType

Definition at line 25 of file fast_sequence.hxx.

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
typedef T* opengm::FastSequence< T, MAX_STACK >::iterator

Definition at line 28 of file fast_sequence.hxx.

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
typedef T* opengm::FastSequence< T, MAX_STACK >::IteratorType

Definition at line 27 of file fast_sequence.hxx.

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
typedef T opengm::FastSequence< T, MAX_STACK >::value_type

Definition at line 24 of file fast_sequence.hxx.

template<class T, size_t MAX_STACK = opengm::USUAL_MAX_FACTOR_ORDER>
typedef T opengm::FastSequence< T, MAX_STACK >::ValueType

Definition at line 23 of file fast_sequence.hxx.


Constructor & Destructor Documentation

template<class T , size_t MAX_STACK>
opengm::FastSequence< T, MAX_STACK >::FastSequence (  )  [inline]

constructor

Definition at line 64 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
opengm::FastSequence< T, MAX_STACK >::FastSequence ( const size_t  size  )  [inline]

constructor

Parameters:
size length of the sequence

Definition at line 75 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
opengm::FastSequence< T, MAX_STACK >::FastSequence ( const size_t  size,
const T &  value 
) [inline]

constructor

Parameters:
size lenght of the sequence
value initial value

Definition at line 95 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
opengm::FastSequence< T, MAX_STACK >::FastSequence ( const FastSequence< T, MAX_STACK > &  other  )  [inline]

copy constructor

Parameters:
other container to copy

Definition at line 116 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
opengm::FastSequence< T, MAX_STACK >::~FastSequence (  )  [inline]

destructor

Definition at line 135 of file fast_sequence.hxx.


Member Function Documentation

template<class T , size_t MAX_STACK>
template<class ITERATOR >
void opengm::FastSequence< T, MAX_STACK >::assign ( ITERATOR  begin,
ITERATOR  end 
) [inline]

assign values

Parameters:
begin begin iterator
end end iterator

Definition at line 342 of file fast_sequence.hxx.

Here is the call graph for this function:

template<class T , size_t MAX_STACK>
T & opengm::FastSequence< T, MAX_STACK >::back (  )  [inline]

reference to the last entry

Definition at line 357 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
const T & opengm::FastSequence< T, MAX_STACK >::back (  )  const [inline]

reference to the last entry

Definition at line 350 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
T *const opengm::FastSequence< T, MAX_STACK >::begin (  )  [inline]

begin iterator

Definition at line 204 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
T const * opengm::FastSequence< T, MAX_STACK >::begin (  )  const [inline]

begin iterator

Definition at line 188 of file fast_sequence.hxx.

Here is the caller graph for this function:

template<class T , size_t MAX_STACK>
void opengm::FastSequence< T, MAX_STACK >::clear (  )  [inline]

clear the sequence

Definition at line 316 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
bool opengm::FastSequence< T, MAX_STACK >::empty (  )  const [inline]

query if the sequence is empty

Definition at line 332 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
T *const opengm::FastSequence< T, MAX_STACK >::end (  )  [inline]

end iterator

Definition at line 212 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
T const * opengm::FastSequence< T, MAX_STACK >::end (  )  const [inline]

end iterator

Definition at line 196 of file fast_sequence.hxx.

Here is the caller graph for this function:

template<class T , size_t MAX_STACK>
T & opengm::FastSequence< T, MAX_STACK >::front (  )  [inline]

reference to the first entry

Definition at line 371 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
const T & opengm::FastSequence< T, MAX_STACK >::front (  )  const [inline]

reference to the first entry

Definition at line 364 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
FastSequence< T, MAX_STACK > & opengm::FastSequence< T, MAX_STACK >::operator= ( const FastSequence< T, MAX_STACK > &  other  )  [inline]

assignment operator

Parameters:
other container to copy

Definition at line 146 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
T & opengm::FastSequence< T, MAX_STACK >::operator[] ( const size_t  index  )  [inline]

access entries

Definition at line 233 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
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.

template<class T , size_t MAX_STACK>
void opengm::FastSequence< T, MAX_STACK >::push_back ( const T &  value  )  [inline]

append a value

Parameters:
value value to append

Definition at line 245 of file fast_sequence.hxx.

Here is the caller graph for this function:

template<class T , size_t MAX_STACK>
void opengm::FastSequence< T, MAX_STACK >::reserve ( const size_t  size  )  [inline]

reserve memory

Parameters:
size new size of the container

Definition at line 294 of file fast_sequence.hxx.

template<class T , size_t MAX_STACK>
void opengm::FastSequence< T, MAX_STACK >::resize ( const size_t  size  )  [inline]

resize the sequence

Parameters:
size new size of the container

Definition at line 270 of file fast_sequence.hxx.

Here is the caller graph for this function:

template<class T , size_t MAX_STACK>
size_t opengm::FastSequence< T, MAX_STACK >::size (  )  const [inline]

size

Definition at line 180 of file fast_sequence.hxx.

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:10 2013 for OpenGM by  doxygen 1.6.3