Gecode::Support::DynamicStack< T > Class Template Reference
[Support algorithms and datastructures]
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. | |
| T | 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] |
template<class T>
| Gecode::Support::DynamicStack< T >::~DynamicStack | ( | void | ) | [inline] |
Member Function Documentation
template<class T>
| bool Gecode::Support::DynamicStack< T >::empty | ( | void | ) | const [inline] |
template<class T>
| T Gecode::Support::DynamicStack< T >::pop | ( | void | ) | [inline] |
template<class T>
| T & Gecode::Support::DynamicStack< T >::top | ( | void | ) | [inline] |
template<class T>
| void Gecode::Support::DynamicStack< T >::push | ( | T | x | ) | [inline] |
template<class T>
| int Gecode::Support::DynamicStack< T >::entries | ( | void | ) | const [inline] |
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] |
The documentation for this class was generated from the following file:
- gecode/support/dynamic-stack.icc (Revision: 5048)
