Generated on Mon Aug 25 11:35:54 2008 for Gecode by doxygen 1.5.6

Gecode::Support::DynamicStack< T > Class Template Reference
[Support algorithms and datastructures]

List of all members.


Detailed Description

template<class T>
class Gecode::Support::DynamicStack< T >

Stack with arbitrary number of elements.

Definition at line 46 of file dynamic-stack.icc.


Public Member Functions

 DynamicStack (int n=64)
 Initialize stack with n elements.
 ~DynamicStack (void)
 Release memory.
bool empty (void) const
 Test whether stack is empty.
pop (void)
 Pop topmost element from stack and return it.
T & top (void)
 Return top of stack.
void push (T)
 Push element on stack.
int entries (void) const
 Return number of entries currently on stack.
T & operator[] (int i)
 Return entry at position i.
const T & operator[] (int i) const
 Return entry at position i.
size_t size (void) const
 Return size of stack.

Constructor & Destructor Documentation

template<class T>
Gecode::Support::DynamicStack< T >::DynamicStack ( int  n = 64  )  [inline]

Initialize stack with n elements.

Definition at line 106 of file dynamic-stack.icc.

template<class T>
Gecode::Support::DynamicStack< T >::~DynamicStack ( void   )  [inline]

Release memory.

Definition at line 111 of file dynamic-stack.icc.


Member Function Documentation

template<class T>
bool Gecode::Support::DynamicStack< T >::empty ( void   )  const [inline]

Test whether stack is empty.

Definition at line 137 of file dynamic-stack.icc.

template<class T>
T Gecode::Support::DynamicStack< T >::pop ( void   )  [inline]

Pop topmost element from stack and return it.

Definition at line 117 of file dynamic-stack.icc.

template<class T>
T & Gecode::Support::DynamicStack< T >::top ( void   )  [inline]

Return top of stack.

Definition at line 123 of file dynamic-stack.icc.

template<class T>
void Gecode::Support::DynamicStack< T >::push ( x  )  [inline]

Push element on stack.

Definition at line 129 of file dynamic-stack.icc.

template<class T>
int Gecode::Support::DynamicStack< T >::entries ( void   )  const [inline]

Return number of entries currently on stack.

Definition at line 143 of file dynamic-stack.icc.

template<class T>
T & Gecode::Support::DynamicStack< T >::operator[] ( int  i  )  [inline]

Return entry at position i.

Position 0 corresponds to the element first pushed, whereas position entries()-1 corresponds to the element pushed last.

Definition at line 149 of file dynamic-stack.icc.

template<class T>
const T & Gecode::Support::DynamicStack< T >::operator[] ( int  i  )  const [inline]

Return entry at position i.

Position 0 corresponds to the element first pushed, whereas position entries()-1 corresponds to the element pushed last.

Definition at line 155 of file dynamic-stack.icc.

template<class T>
size_t Gecode::Support::DynamicStack< T >::size ( void   )  const [inline]

Return size of stack.

Definition at line 161 of file dynamic-stack.icc.


The documentation for this class was generated from the following file: