Gecode::Support::StaticStack< T > Class Template Reference
[Support algorithms and datastructures]
#include <static-stack.hh>
Detailed Description
template<class T>
class Gecode::Support::StaticStack< T >
Stack with fixed number of elements.
Requires
#include "gecode/support/static-stack.hh"
Definition at line 36 of file static-stack.hh.
Public Member Functions | |
StaticStack (const int n) | |
Initialize for n elements. | |
~StaticStack (void) | |
Release memory. | |
void | reset (void) |
Reset stack (pop all elements). | |
bool | empty (void) const |
Test whether stack is empty. | |
T | pop (void) |
Pop topmost element from stack and return it. | |
T & | top (void) |
Return element on top of stack. | |
T & | last (void) |
Return element that has just been popped. | |
void | push (T x) |
Push element x on top of stack. |
Constructor & Destructor Documentation
|
Initialize for n elements.
Definition at line 66 of file static-stack.hh. |
|
Release memory.
Definition at line 73 of file static-stack.hh. |
Member Function Documentation
|
Reset stack (pop all elements).
Definition at line 85 of file static-stack.hh. |
|
Test whether stack is empty.
Definition at line 79 of file static-stack.hh. |
|
Pop topmost element from stack and return it.
Definition at line 91 of file static-stack.hh. |
|
Return element on top of stack.
Definition at line 97 of file static-stack.hh. |
|
Return element that has just been popped.
Definition at line 103 of file static-stack.hh. |
|
Push element x on top of stack.
Definition at line 109 of file static-stack.hh. |
The documentation for this class was generated from the following file:
- gecode/support/static-stack.hh (Revision: 3188)