Generated on Wed Nov 1 15:05:25 2006 for Gecode by doxygen 1.4.5

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

#include <dynamic-stack.hh>

List of all members.


Detailed Description

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

Stack with arbitrary number of elements.

Requires

Definition at line 36 of file dynamic-stack.hh.

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 94 of file dynamic-stack.hh.

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

Release memory.

Definition at line 99 of file dynamic-stack.hh.


Member Function Documentation

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

Test whether stack is empty.

Definition at line 125 of file dynamic-stack.hh.

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

Pop topmost element from stack and return it.

Definition at line 105 of file dynamic-stack.hh.

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

Return top of stack.

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

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

Push element on stack.

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

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

Return number of entries currently on stack.

Definition at line 131 of file dynamic-stack.hh.

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 137 of file dynamic-stack.hh.

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 143 of file dynamic-stack.hh.

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

Return size of stack.

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


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