Template Class MultiStack
Defined in File MultiStack.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T>
class MultiStack k stacks sharing a vector of linked cells
Public Types
-
using const_iterator = IndexIterator<Cell, T, &Cell::below, &Cell::value>
Public Functions
-
explicit MultiStack(int k)
k empty stacks
- Pre:
k > 0
-
int stacks(void) const
-
bool empty(int i) const
- Pre:
0 <= i < k
-
int size(int i) const
- Pre:
0 <= i < k
-
void push(int i, const T &v)
v on the stack i; v may be an item of the stacks, e.g., top( j )
- Pre:
0 <= i < k
- Post:
one item more in the stack i
-
inline std::ranges::subrange<const_iterator> stack(int i) const
the items of the stack i, the top first
- Pre:
0 <= i < stacks()
-
using const_iterator = IndexIterator<Cell, T, &Cell::below, &Cell::value>