Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::FixedStack< T > Class Template Reference

Fixed length stack. More...

#include <tpl_arrayStack.H>

Inheritance diagram for Aleph::FixedStack< T >:
[legend]
Collaboration diagram for Aleph::FixedStack< T >:
[legend]

Classes

class  Iterator
 Iterator on the items of a stack. More...
 

Public Types

using Item_Type = T
 
using Const_Iterator = Aleph::Const_Iterator< Iterator >
 Read-only iterator: the iterator of a constant container.
 
- Public Types inherited from StlAlephIterator< FixedStack< T > >
using iterator = StlIterator< FixedStack< T > >
 
using const_iterator = StlConstIterator< FixedStack< T > >
 

Public Member Functions

 FixedStack (const size_t d=1024)
 The type of element.
 
 ~FixedStack ()
 
 FixedStack (const FixedStack &s)
 Copy constructor.
 
template<template< typename > class List>
 FixedStack (const List< T > &l)
 
template<class It >
requires (not std::is_arithmetic_v<It> and requires (It it) { *it; ++it; it != it; })
 FixedStack (It b, It e)
 
 FixedStack (std::initializer_list< T > l)
 
void swap (FixedStack &s) noexcept
 Swap in constant time s with this
 
 FixedStack (FixedStack &&s) noexcept
 Move constructor.
 
FixedStack & operator= (const FixedStack &s)
 Assign by copy s to this
 
FixedStack & operator= (FixedStack &&s) noexcept
 
T & push (const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
 Push a copy of data
 
T & push (T &&data) noexcept(std::is_nothrow_move_assignable_v< T >)
 Push and move data
 
T & append (const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
 See push(const T & data).
 
T & append (T &&data) noexcept(std::is_nothrow_move_assignable_v< T >)
 See push(T && data).
 
T & insert (const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
 See push(const T & data).
 
T & insert (T &&data) noexcept(std::is_nothrow_move_assignable_v< T >)
 See push(T && data).
 
T & pushn (const size_t &n=1) noexcept
 Push in constant time nspaces into stack.
 
T pop () noexcept
 Pop by moving the top of stack.
 
T popn (const int n) noexcept
 Perform in constant time n pops.
 
T & top () noexcept
 Return a modifiable reference to stack's top.
 
const T & top () const noexcept
 
T & get_last () noexcept
 
const T & get_last () const noexcept
 
T & base () noexcept
 Return the internal array base.
 
const T & base () const noexcept
 
T & top (const size_t i) noexcept
 Return a modifiable reference to item located i positions after top.
 
const T & top (const size_t i) const noexcept
 
bool is_empty () const noexcept
 Return true if stack is empty.
 
void empty () noexcept
 Empty the stack.
 
void clear () noexcept
 Empties the container.
 
size_t size () const noexcept
 Return the number of elements stored in the stack.
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, T &>
bool traverse (Operation &operation) noexcept(Aleph::NothrowPredicateWith< Operation &, T & >)
 Traverse all the items of stack from the youngest to oldest and conditionally performs an operation.
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, const T &>
bool traverse (Operation &operation) const noexcept(Aleph::NothrowPredicateWith< Operation &, const T & >)
 See traverse(Operation & operation).
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, const T &>
bool traverse (Operation &&operation=Operation()) const noexcept(Aleph::NothrowPredicateWith< Operation &, const T & >)
 See traverse(Operation & operation).
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, T &>
bool traverse (Operation &&operation=Operation()) noexcept(Aleph::NothrowPredicateWith< Operation &, T & >)
 See traverse(Operation & operation).
 
- Public Member Functions inherited from LocateFunctions< FixedStack< T >, T >
auto get_it ()
 Return a properly initialized iterator positioned at the first item on the container.
 
auto get_it () const
 Read-only iterator positioned at the first item.
 
auto get_it (const size_t pos)
 Return a properly initialized iterator positioned at the pos item on the container.
 
auto get_it (const size_t pos) const
 Read-only iterator positioned at the pos item.
 
auto get_itor ()
 Alias of get_it().
 
auto get_itor () const
 See get_itor().
 
T & nth_ne (const size_t n) noexcept(Aleph::dry_detail::mutable_traversal_is_noexcept< C, T >)
 Return the n‑th element without bounds checking.
 
const T & nth_ne (const size_t n) const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< FixedStack< T >, T >)
 Constant overload of nth_ne(size_t).
 
T & nth (const size_t n)
 Return the n-th item of the container.
 
const T & nth (const size_t n) const
 Const overload of nth(size_t).
 
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< FixedStack< T >, Operation >::type, T > T * find_ptr (Operation &operation) noexcept(mutable_search_is_noexcept< Operation >())
 Find a pointer to an item in the container according to a searching criterion.
 
const T * find_ptr (Operation &operation) const noexcept(const_search_is_noexcept< Operation >())
 Const overload of find_ptr(Operation&).
 
const T * find_ptr (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >())
 Overload of find_ptr() const that accepts rvalues.
 
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< FixedStack< T >, Operation >::type, T > T * find_ptr (Operation &&operation) noexcept(mutable_search_is_noexcept< Operation >())
 Overload of find_ptr() that accepts rvalues.
 
size_t find_index (Operation &operation) const noexcept(const_search_is_noexcept< Operation >())
 Find the position of an item in the container according to a searching criterion.
 
size_t find_index (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >())
 Overload of find_index() that accepts rvalues.
 
and std::default_initializable< T > and std::copy_constructible< T > std::tuple< bool, T > find_item (Operation &operation) const noexcept(find_item_is_noexcept< Operation >())
 Safe sequential searching of an item matching a criterion.
 
and std::default_initializable< T > and std::copy_constructible< T > std::tuple< bool, T > find_item (Operation &&operation) const noexcept(find_item_is_noexcept< Operation >())
 Overload of find_item() that accepts rvalues.
 
and std::copy_constructible< T > std::optional< T > find_opt (Operation &operation) const
 Copy of the first item satisfying a criterion, if any.
 
and std::copy_constructible< T > std::optional< T > find_opt (Operation &&operation) const
 Overload of find_opt() that accepts rvalues.
 
bool contains_if (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >())
 Test if an item satisfying a criterion is present in the container.
 
bool contains (const T &item) const
 Test if an item is present in the container using equality.
 
- Public Member Functions inherited from FunctionalMethods< FixedStack< T >, T >
void emplace (Args &&... args)
 Appends a new element into the container by constructing it from the given args.
 
void emplace_end (Args &&... args)
 See emplace(Args && ... args).
 
void emplace_ins (Args &&... args)
 
size_t ninsert (Args &&... args)
 Insert n variadic items.
 
size_t nappend (Args &&... args)
 Append n variadic items.
 
void for_each (Operation &operation) const
 Traverse all the container and performs an operation on each element.
 
void for_each (Operation &&operation) const
 Overload of for_each() that accepts rvalues.
 
void each (Operation &operation) const
 Alias of for_each().
 
void each (Operation &&operation) const
 Alias of for_each() that accepts rvalues.
 
void each (const size_t pos, const size_t slice, Operation &operation) const
 Traverse the container starting at pos taking one item every slice, performing an operation on each visited element.
 
void each (const size_t pos, const size_t slice, Operation &&operation) const
 See each(size_t pos, size_t slice, Operation & operation) const.
 
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< FixedStack< T >, Operation >::type, T > void each (const size_t pos, const size_t slice, Operation &operation)
 Traverse the container starting at pos taking one item every slice, performing an operation that may modify each visited item.
 
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< FixedStack< T >, Operation >::type, T > void each (const size_t pos, const size_t slice, Operation &&operation)
 See each(size_t pos, size_t slice, Operation & operation).
 
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< FixedStack< T >, Operation >::type, T > void mutable_for_each (Operation &operation)
 Apply a mutable operation to each element of the container.
 
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< FixedStack< T >, Operation >::type, T > void mutable_for_each (Operation &&operation)
 See mutable_for_each(Operation & operation).
 
bool all (Operation &operation) const
 Check if all the elements of the container satisfy a condition.
 
bool all (Operation &&operation) const
 Overload of all() that accepts rvalues.
 
bool exists (Operation &op) const
 Test for existence in the container of an element satisfying a criterion.
 
bool exists (Operation &&op) const
 Overload of exists() that accepts rvalues.
 
bool none (Operation &op) const
 Test that no element satisfies a criterion.
 
bool none (Operation &&op) const
 Overload of none() that accepts rvalues.
 
size_t count_if (Operation &op) const
 Count the elements that satisfy a criterion.
 
size_t count_if (Operation &&op) const
 Overload of count_if() that accepts rvalues.
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps (Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps (Operation &&op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps_if (Prop prop, Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps_if (Prop prop, Operation &&op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map (Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map (Operation &&op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map_if (Prop prop, Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map_if (Prop prop, Operation &&op) const
 
auto flat_map (Operation &op) const
 Map each element to a container and concatenate the results.
 
auto flat_map (Operation &&op) const
 Overload of flat_map() that accepts rvalues.
 
Aleph::DynList< T > to_dynlist () const
 Convert container to DynList.
 
std::vector< T > to_vector () const
 Convert container to std::vector.
 
Acc foldl (const Acc &init, Op &op) const
 Fold the elements of the container to a specific result.
 
Acc foldl (const Acc &init, Op &&op) const
 Overload of foldl() that accepts rvalues.
 
Acc fold_left (const Acc &init, Op &op) const
 Alias for foldl().
 
Acc fold_left (const Acc &init, Op &&op) const
 Overload of fold_left() that accepts rvalues.
 
T fold (const T &init, Operation &operation) const
 Simplified version of foldl() where the folded type is the same type of elements stored in the container.
 
T fold (const T &init, Operation &&operation) const
 Overload of fold() that accepts rvalues.
 
Acc foldr (const Acc &init, Op &op) const
 Fold the elements from the last to the first.
 
Acc foldr (const Acc &init, Op &&op) const
 Overload of foldr() that accepts rvalues.
 
and std::copy_constructible< U > std::optional< T > reduce (Op &op) const
 Fold the elements with no initial value.
 
and std::copy_constructible< U > std::optional< T > reduce (Op &&op) const
 Overload of reduce() that accepts rvalues.
 
Aleph::DynList< T > filter (Operation &operation) const
 Filter the elements of a container according to a matching criterion.
 
Aleph::DynList< T > filter (Operation &&operation) const
 Overload of filter() that accepts rvalues.
 
Aleph::DynList< const T * > ptr_filter (Operation &operation) const
 Filter the elements of a container according to a matching criterion and return a pointer to the matched items in the container.
 
Aleph::DynList< const T * > ptr_filter (Operation &&operation) const
 Overload of ptr_filter() that accepts rvalues.
 
Aleph::DynList< std::tuple< T, size_t > > pfilter (Operation &operation) const
 Filter the elements of a container according to a matching criterion and determine its positions respect to the traversal of container.
 
Aleph::DynList< std::tuple< T, size_t > > pfilter (Operation &&operation) const
 Overload of pfilter() that accepts rvalues.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (Operation &op) const
 Exclusive partition of container according to a filter criterion.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (Operation &&op) const
 Overload of partition() that accepts rvalues.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (size_t n) const
 Exclusive partition of container in the nth item.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > split_half () const
 Split the container into two halves by alternating elements.
 
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > tpartition (Operation &op) const
 Exclusive partition of container according to a filter criterion.
 
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > tpartition (Operation &&op) const
 Overload of tpartition() that accepts rvalues.
 
size_t length () const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< FixedStack< T >, T >)
 Count the number of elements of a container.
 
Aleph::DynList< T > rev () const
 Return a list with the elements of container in reverse order respect to its traversal order.
 
Aleph::DynList< T > take (const size_t n) const
 Return a list with the first n elements seen in the container during its traversal.
 
Aleph::DynList< T > take (size_t i, const size_t j, const size_t step=1) const
 Return a list with the elements at positions i, i + step, i + 2 step, ... that are not greater than j, respect to the traversal order.
 
Aleph::DynList< T > drop (const size_t n) const
 Drop the first n elements seen in the container during its traversal.
 
Aleph::DynList< T > take_while (Operation &op) const
 The longest prefix of elements that satisfy a criterion.
 
Aleph::DynList< T > take_while (Operation &&op) const
 Overload of take_while() that accepts rvalues.
 
Aleph::DynList< T > drop_while (Operation &op) const
 The elements after the longest prefix that satisfies a criterion.
 
Aleph::DynList< T > drop_while (Operation &&op) const
 Overload of drop_while() that accepts rvalues.
 
void mutable_drop (const size_t n)
 Drop the first n elements seen from container.
 
- Public Member Functions inherited from GenericItems< Container, T >
Aleph::DynList< T > items () const
 Return a list of all the elements of a container sorted by traversal order.
 
Aleph::DynList< T > keys () const
 See items().
 
- Public Member Functions inherited from EqualSequenceMethod< FixedStack< T > >
bool equal_to (const FixedStack< T > &r) const
 Equality test between this and r.
 
- Public Member Functions inherited from StlAlephIterator< FixedStack< T > >
iterator begin () noexcept
 Return an STL-compatible iterator to the first element.
 
const_iterator begin () const noexcept
 Return a const iterator to the first element.
 
iterator end () noexcept
 Return an STL-compatible end iterator.
 
const_iterator end () const noexcept
 Return a const end iterator.
 
const_iterator cbegin () const noexcept
 Return a const iterator to the first element.
 
const_iterator cend () const noexcept
 Return a const end iterator.
 

Private Attributes

T * array = nullptr
 
size_t head = 0
 
size_t dim = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from FunctionalMethods< FixedStack< T >, T >
static FixedStack< T > build (Items &&... items)
 Build a container that holds the given items.
 
static D build_as (Items &&... items)
 Build a D, a class derived from the container, holding the given items.
 
- Public Attributes inherited from FunctionalMethods< FixedStack< T >, T >
 and
 Insert a new element into the container by constructing it from the given args.
 
and Aleph::InvocableWith< Operation &, const T & > and
 Conditional mapping of the elements of the container.
 

Detailed Description

template<typename T>
class Aleph::FixedStack< T >

Fixed length stack.

FixedStack<T> models a stack with a maximum capacity. In addition, no operation performs checks, what gives to all operations the highest performance.

Note
Use this type when you have an precise idea about the maximum stack size and this last is not too big.
See also
ArrayStack DynListStack

Definition at line 397 of file tpl_arrayStack.H.

Member Typedef Documentation

◆ Const_Iterator

Read-only iterator: the iterator of a constant container.

Definition at line 714 of file tpl_arrayStack.H.

◆ Item_Type

template<typename T >
using Aleph::FixedStack< T >::Item_Type = T

Definition at line 408 of file tpl_arrayStack.H.

Constructor & Destructor Documentation

◆ FixedStack() [1/6]

template<typename T >
Aleph::FixedStack< T >::FixedStack ( const size_t  d = 1024)
inline

The type of element.

Construct a fixed stack of maximum d items.

Parameters
[in]dcapacity of the stack
Exceptions
overflow_errorif the bytes of d items do not fit in a size_t.
bad_allocif there is no memory for the array

Definition at line 417 of file tpl_arrayStack.H.

References ah_overflow_error_if, and Aleph::FixedStack< T >::array.

◆ ~FixedStack()

template<typename T >
Aleph::FixedStack< T >::~FixedStack ( )
inline

Definition at line 429 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array.

◆ FixedStack() [2/6]

template<typename T >
Aleph::FixedStack< T >::FixedStack ( const FixedStack< T > &  s)
inline

Copy constructor.

Definition at line 436 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, Aleph::FixedStack< T >::dim, and Aleph::FixedStack< T >::head.

◆ FixedStack() [3/6]

template<typename T >
template<template< typename > class List>
Aleph::FixedStack< T >::FixedStack ( const List< T > &  l)
inline

Definition at line 444 of file tpl_arrayStack.H.

◆ FixedStack() [4/6]

template<typename T >
template<class It >
requires (not std::is_arithmetic_v<It> and requires (It it) { *it; ++it; it != it; })
Aleph::FixedStack< T >::FixedStack ( It  b,
It  e 
)
inline

Definition at line 444 of file tpl_arrayStack.H.

◆ FixedStack() [5/6]

template<typename T >
Aleph::FixedStack< T >::FixedStack ( std::initializer_list< T >  l)
inline

Definition at line 444 of file tpl_arrayStack.H.

◆ FixedStack() [6/6]

template<typename T >
Aleph::FixedStack< T >::FixedStack ( FixedStack< T > &&  s)
inlinenoexcept

Move constructor.

Definition at line 455 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::swap().

Member Function Documentation

◆ append() [1/2]

template<typename T >
T & Aleph::FixedStack< T >::append ( const T &  data)
inlinenoexcept

See push(const T & data).

Definition at line 502 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::push().

◆ append() [2/2]

template<typename T >
T & Aleph::FixedStack< T >::append ( T &&  data)
inlinenoexcept

See push(T && data).

Definition at line 508 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::push().

◆ base() [1/2]

template<typename T >
const T & Aleph::FixedStack< T >::base ( ) const
inlinenoexcept

Definition at line 593 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array.

◆ base() [2/2]

template<typename T >
T & Aleph::FixedStack< T >::base ( )
inlinenoexcept

Return the internal array base.

Definition at line 588 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array.

◆ clear()

template<typename T >
void Aleph::FixedStack< T >::clear ( )
inlinenoexcept

Empties the container.

Exceptions
none
See also
empty()

Definition at line 634 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::empty().

◆ empty()

template<typename T >
void Aleph::FixedStack< T >::empty ( )
inlinenoexcept

Empty the stack.

Definition at line 624 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::head.

Referenced by Aleph::FixedStack< T >::clear().

◆ get_last() [1/2]

template<typename T >
const T & Aleph::FixedStack< T >::get_last ( ) const
inlinenoexcept

Definition at line 582 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::top().

◆ get_last() [2/2]

template<typename T >
T & Aleph::FixedStack< T >::get_last ( )
inlinenoexcept

Definition at line 577 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::top().

◆ insert() [1/2]

template<typename T >
T & Aleph::FixedStack< T >::insert ( const T &  data)
inlinenoexcept

See push(const T & data).

Definition at line 514 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::push().

◆ insert() [2/2]

template<typename T >
T & Aleph::FixedStack< T >::insert ( T &&  data)
inlinenoexcept

See push(T && data).

Definition at line 520 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::push().

◆ is_empty()

template<typename T >
bool Aleph::FixedStack< T >::is_empty ( ) const
inlinenoexcept

◆ operator=() [1/2]

template<typename T >
FixedStack & Aleph::FixedStack< T >::operator= ( const FixedStack< T > &  s)
inline

Assign by copy s to this

Definition at line 461 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::swap().

◆ operator=() [2/2]

template<typename T >
FixedStack & Aleph::FixedStack< T >::operator= ( FixedStack< T > &&  s)
inlinenoexcept

Definition at line 471 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::swap().

◆ pop()

◆ popn()

template<typename T >
T Aleph::FixedStack< T >::popn ( const int  n)
inlinenoexcept

Perform in constant time n pops.

Parameters
[in]nnumber of items to opo
Returns
the last popped item

Definition at line 552 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, Aleph::count(), and Aleph::FixedStack< T >::head.

◆ push() [1/2]

◆ push() [2/2]

template<typename T >
T & Aleph::FixedStack< T >::push ( T &&  data)
inlinenoexcept

Push and move data

Parameters
[in]datato be moved
Returns
a modifiable reference to the moved data.

Definition at line 494 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, Aleph::FixedStack< T >::dim, and Aleph::FixedStack< T >::head.

◆ pushn()

template<typename T >
T & Aleph::FixedStack< T >::pushn ( const size_t &  n = 1)
inlinenoexcept

Push in constant time nspaces into stack.

Parameters
[in]nnumber of cells to push
Returns
a modifiable reference to stack's top

Definition at line 530 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, Aleph::FixedStack< T >::dim, and Aleph::FixedStack< T >::head.

◆ size()

template<typename T >
size_t Aleph::FixedStack< T >::size ( ) const
inlinenoexcept

Return the number of elements stored in the stack.

Definition at line 640 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::head.

Referenced by Node_Pool< Node >::deallocate(), Aleph::quicksort(), TEST(), TEST_F(), TEST_F(), and Aleph::MonotonePolygonTriangulation::triangulate_monotone().

◆ swap()

template<typename T >
void Aleph::FixedStack< T >::swap ( FixedStack< T > &  s)
inlinenoexcept

◆ top() [1/4]

template<typename T >
const T & Aleph::FixedStack< T >::top ( ) const
inlinenoexcept

◆ top() [2/4]

template<typename T >
T & Aleph::FixedStack< T >::top ( )
inlinenoexcept

◆ top() [3/4]

template<typename T >
const T & Aleph::FixedStack< T >::top ( const size_t  i) const
inlinenoexcept

◆ top() [4/4]

template<typename T >
T & Aleph::FixedStack< T >::top ( const size_t  i)
inlinenoexcept

Return a modifiable reference to item located i positions after top.

Parameters
[in]inumber of positions.
Returns
a modifiable reference to item located i positions after top.

Definition at line 605 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, and Aleph::FixedStack< T >::head.

◆ traverse() [1/4]

template<typename T >
template<class Operation >
requires Aleph::PredicateWith<Operation &, const T &>
bool Aleph::FixedStack< T >::traverse ( Operation &&  operation = Operation()) const
inlinenoexcept

See traverse(Operation & operation).

Definition at line 678 of file tpl_arrayStack.H.

◆ traverse() [2/4]

template<typename T >
template<class Operation >
requires Aleph::PredicateWith<Operation &, T &>
bool Aleph::FixedStack< T >::traverse ( Operation &&  operation = Operation())
inlinenoexcept

See traverse(Operation & operation).

Definition at line 687 of file tpl_arrayStack.H.

◆ traverse() [3/4]

template<typename T >
template<class Operation >
requires Aleph::PredicateWith<Operation &, const T &>
bool Aleph::FixedStack< T >::traverse ( Operation &  operation) const
inlinenoexcept

See traverse(Operation & operation).

Definition at line 666 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, and Aleph::FixedStack< T >::head.

◆ traverse() [4/4]

template<typename T >
template<class Operation >
requires Aleph::PredicateWith<Operation &, T &>
bool Aleph::FixedStack< T >::traverse ( Operation &  operation)
inlinenoexcept

Traverse all the items of stack from the youngest to oldest and conditionally performs an operation.

Parameters
[in]operationto perform on the current element. If it returns true, then the traversal continues to the next item; otherwise the traversal stops

Definition at line 654 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, and Aleph::FixedStack< T >::head.

Referenced by TEST().

Member Data Documentation

◆ array

◆ dim

◆ head


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