Aleph-w 3.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
 
- Public Types inherited from StlAlephIterator< FixedStack< T > >
using iterator = StlIterator< FixedStack< T > >
 
using const_iterator = StlConstIterator< FixedStack< T > >
 

Public Member Functions

 FixedStack (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 >
 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.
 
FixedStackoperator= (const FixedStack &s)
 Assign by copy s to this
 
FixedStackoperator= (FixedStack &&s) noexcept
 
Tpush (const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
 Push a copy of data
 
Tpush (T &&data) noexcept(std::is_nothrow_move_assignable_v< T >)
 Push and move data
 
Tappend (const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
 
Tappend (T &&data) noexcept(std::is_nothrow_move_assignable_v< T >)
 
Tinsert (const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
 
Tinsert (T &&data) noexcept(std::is_nothrow_move_assignable_v< T >)
 
Tpushn (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.
 
Ttop () noexcept
 Return a modifiable reference to stack's top.
 
const Ttop () const noexcept
 
Tget_last () noexcept
 
const Tget_last () const noexcept
 
Tbase () noexcept
 Return the internal array base.
 
const Tbase () const noexcept
 
Ttop (const size_t i) noexcept
 Return a modifiable reference to item located i positions after top.
 
const Ttop (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 >
bool traverse (Operation &operation)
 Traverse all the items of stack from the youngest to oldest and conditionally performs an operation.
 
template<class Operation >
bool traverse (Operation &operation) const
 
template<class Operation >
bool traverse (Operation &&operation=Operation()) const
 
template<class Operation >
bool traverse (Operation &&operation=Operation())
 
- Public Member Functions inherited from LocateFunctions< FixedStack< T >, T >
auto get_it () const
 Return a properly initialized iterator positioned at the first item on the container.
 
auto get_it (const size_t pos) const
 Return a properly initialized iterator positioned at the pos item on the container.
 
auto get_itor () const
 Alias of get_it().
 
T & nth_ne (const size_t n) noexcept
 Return the n‑th element without bounds checking.
 
const T & nth_ne (const size_t n) const noexcept
 Const 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).
 
T * find_ptr (Operation &operation) noexcept(operation_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(operation_is_noexcept< Operation >())
 Const overload of find_ptr(Operation&).
 
const T * find_ptr (Operation &&operation) const noexcept(operation_is_noexcept< Operation >())
 Overload of find_ptr() const that accepts rvalues.
 
T * find_ptr (Operation &&operation) noexcept(operation_is_noexcept< Operation >())
 Overload of find_ptr() that accepts rvalues.
 
size_t find_index (Operation &operation) const noexcept(operation_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(operation_is_noexcept< Operation >())
 Overload of find_index() that accepts rvalues.
 
std::tuple< bool, T > find_item (Operation &operation) noexcept(operation_is_noexcept< Operation >())
 Safe sequential searching of an item matching a criterion.
 
std::tuple< bool, T > find_item (Operation &operation) const noexcept(operation_is_noexcept< Operation >())
 
std::tuple< bool, T > find_item (Operation &&operation) noexcept(operation_is_noexcept< Operation >())
 Overload of find_item() that accepts rvalues.
 
std::tuple< bool, T > find_item (Operation &&operation) const noexcept(operation_is_noexcept< Operation >())
 Overload of find_item() const that accepts rvalues.
 
bool contains_if (Operation &&operation) const noexcept(operation_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 in-place with the given args.
 
void emplace_end (Args &&... args)
 
void emplace_ins (Args &&... args)
 Insert a new element into the container by constructing it in-place with the given args.
 
size_t ninsert (Args ... args)
 Insert n variadic items.
 
size_t nappend (Args ... args)
 Append n variadic items.
 
void for_each (Operation &operation)
 Traverse all the container and performs an operation on each element.
 
void for_each (Operation &operation) const
 Const overload of for_each(Operation&).
 
void for_each (Operation &&operation) const
 Overload of for_each() const that accepts rvalues.
 
void for_each (Operation &&operation)
 Overload of for_each() that accepts rvalues.
 
void each (Operation &operation)
 Alias of for_each(Operation&).
 
void each (Operation &operation) const
 Const alias of for_each(Operation&).
 
void each (Operation &&operation) const
 Const alias of each() that accepts rvalues.
 
void each (Operation &&operation)
 Alias of each() that accepts rvalues.
 
void each (size_t pos, const size_t slice, Operation &operation) const
 Traverse the container starting at pos taking one item every slice, performing a mutable operation on each visited element.
 
void each (const size_t pos, const size_t slice, Operation &&operation) const
 
void mutable_for_each (Operation &operation)
 Apply a mutable operation to each element of the container.
 
void 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.
 
Aleph::DynList< __T > maps (Operation &op) const
 Map the elements of the container.
 
Aleph::DynList< __T > maps (Operation &&op) const
 Overload of maps() that accepts rvalues.
 
Aleph::DynList< __T > maps_if (Prop prop, Operation &op) const
 Conditional mapping of the elements of the container.
 
Aleph::DynList< __T > maps_if (Prop prop, Operation &&op) const
 Overload of maps_if() that accepts rvalues.
 
Aleph::DynList< T > to_dynlist () const
 Convert container to DynList.
 
std::vector< T > to_vector () const
 Convert container to std::vector.
 
__T foldl (const __T &init, Op &op) const
 Fold the elements of the container to a specific result.
 
__T foldl (const __T &init, Op &&op=Op()) const
 Overload of foldl() that accepts rvalues.
 
__T fold_left (const __T &init, Op &op) const
 Alias for foldl with the same accumulator type.
 
__T fold_left (const __T &init, Op &&op=Op()) const
 Overload of fold_left() that accepts rvalues.
 
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.
 
fold (const T &init, Operation &&operation) const
 Overload of fold() 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
 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 elements seen in the container between i and j position respect to its traversal.
 
Aleph::DynList< T > drop (const size_t n) const
 Drop the first n elements seen in the container during its traversal.
 
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
 
- Public Member Functions inherited from EqualToMethod< FixedStack< T > >
bool equal_to (const FixedStack< T > &r) const noexcept
 Test if elements of this are exactly contained in another container.
 
bool operator== (const FixedStack< T > &r) const noexcept
 
bool operator!= (const FixedStack< T > &r) const noexcept
 Negation of equal_to()
 
- 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

Tarray = nullptr
 
size_t head = 0
 
size_t dim = 0
 

Additional Inherited Members

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 more 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 347 of file tpl_arrayStack.H.

Member Typedef Documentation

◆ Item_Type

Definition at line 358 of file tpl_arrayStack.H.

Constructor & Destructor Documentation

◆ FixedStack() [1/6]

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

The type of element.

Construct a fixed stack of maximum d items

Definition at line 361 of file tpl_arrayStack.H.

◆ ~FixedStack()

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

Definition at line 369 of file tpl_arrayStack.H.

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

◆ FixedStack() [2/6]

◆ FixedStack() [3/6]

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

Definition at line 385 of file tpl_arrayStack.H.

◆ FixedStack() [4/6]

template<typename T >
template<class It >
Aleph::FixedStack< T >::FixedStack ( It  b,
It  e 
)
inline

Definition at line 385 of file tpl_arrayStack.H.

◆ FixedStack() [5/6]

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

Definition at line 385 of file tpl_arrayStack.H.

◆ FixedStack() [6/6]

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

Move constructor.

Definition at line 396 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

Definition at line 444 of file tpl_arrayStack.H.

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

◆ append() [2/2]

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

Definition at line 450 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 526 of file tpl_arrayStack.H.

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

◆ base() [2/2]

◆ clear()

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

Empties the container.

Exceptions
none
See also
empty()

Definition at line 558 of file tpl_arrayStack.H.

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

◆ empty()

◆ get_last() [1/2]

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

Definition at line 521 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 519 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

Definition at line 456 of file tpl_arrayStack.H.

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

◆ insert() [2/2]

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

Definition at line 462 of file tpl_arrayStack.H.

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

◆ is_empty()

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

Return true if stack is empty.

Definition at line 548 of file tpl_arrayStack.H.

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

Referenced by Node_Pool< Node >::~Node_Pool(), Node_Pool< Node >::allocate(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::avl_stack_at_base(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::avl_stack_at_base(), Aleph::HtdRbTree< Key, Compare >::balanceDownAndColor(), Aleph::HtdRbTreeRk< Key, Compare >::balanceDownAndColor(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::clean_avl_stack(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::clean_avl_stack(), Aleph::HtdRbTree< Key, Compare >::doubleRotateNephewAndColor(), Aleph::HtdRbTreeRk< Key, Compare >::doubleRotateNephewAndColor(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::extract_max(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::extract_min(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_left(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_right(), Aleph::GenBinHeap< NodeType, Key, Compare >::Iterator::next_ne(), Aleph::quicksort(), Aleph::quicksort_op(), Aleph::HtdRbTree< Key, Compare >::rotateNephewAndColor(), Aleph::HtdRbTreeRk< Key, Compare >::rotateNephewAndColor(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_pos(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos(), TEST(), and Aleph::MonotonePolygonTriangulation::triangulate_monotone().

◆ 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 403 of file tpl_arrayStack.H.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::FixedStack< T >::swap().

◆ operator=() [2/2]

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

Definition at line 413 of file tpl_arrayStack.H.

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

◆ pop()

template<typename T >
T Aleph::FixedStack< T >::pop ( )
inlinenoexcept

Pop by moving the top of stack.

Definition at line 482 of file tpl_arrayStack.H.

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

Referenced by Node_Pool< Node >::~Node_Pool(), Node_Pool< Node >::allocate(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::extract_max(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::extract_min(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::fix_black_condition(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::fix_red_condition(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_left(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_right(), Aleph::GenBinHeap< NodeType, Key, Compare >::Iterator::next_ne(), Aleph::quicksort(), Aleph::quicksort(), Aleph::quicksort_op(), Aleph::HtdRbTree< Key, Compare >::removeAndFixBlackCondition(), Aleph::HtdRbTreeRk< Key, Compare >::removeAndFixBlackCondition(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::restore_avl_after_deletion(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::restore_avl_after_deletion(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::restore_avl_after_insertion(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::restore_avl_after_insertion(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_pos(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos(), Aleph::MonotonePolygonTriangulation::triangulate_monotone(), and Aleph::Cnode::words_impl().

◆ popn()

◆ push() [1/2]

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

Push a copy of data

Parameters
[in]data
Returns
a modifiable reference to the copied data.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 424 of file tpl_arrayStack.H.

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

Referenced by Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::Gen_Avl_Tree(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::Gen_Avl_Tree_Rk(), Aleph::FixedStack< T >::append(), Aleph::FixedStack< T >::append(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::clean_avl_stack(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::clean_avl_stack(), Node_Pool< Node >::deallocate(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::extract_max(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::extract_min(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_succ_and_swap(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::find_succ_and_swap(), Aleph::HtdRbTree< Key, Compare >::findSuccAndSwap(), Aleph::HtdRbTreeRk< Key, Compare >::findSuccAndSwap(), Aleph::FixedStack< T >::insert(), Aleph::FixedStack< T >::insert(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_left(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::join_right(), Aleph::GenBinHeap< NodeType, Key, Compare >::Iterator::next_ne(), Aleph::quicksort(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::search_and_stack_avl(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::search_and_stack_avl(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::search_dup_and_stack_avl(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_avl(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::HtdRbTree< Key, Compare >::searchAndBuildPath(), Aleph::HtdRbTreeRk< Key, Compare >::searchAndBuildPath(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::split_pos(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::swapWithSuccessor(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::swapWithSuccessor(), Aleph::MonotonePolygonTriangulation::triangulate_monotone(), Aleph::Cnode::words_impl(), and Aleph::Cnode::words_with_prefix().

◆ push() [2/2]

template<typename 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.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 436 of file tpl_arrayStack.H.

References Aleph::FixedStack< T >::array, Aleph::FixedStack< T >::dim, Aleph::divide_and_conquer_partition_dp(), 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 472 of file tpl_arrayStack.H.

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

◆ size()

◆ swap()

◆ 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

Return a modifiable reference to stack's top.

Definition at line 505 of file tpl_arrayStack.H.

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

Referenced by Aleph::HtdRbTree< Key, Compare >::balanceDownAndColor(), Aleph::HtdRbTreeRk< Key, Compare >::balanceDownAndColor(), Aleph::HtdRbTree< Key, Compare >::doubleRotateNephewAndColor(), Aleph::HtdRbTreeRk< Key, Compare >::doubleRotateNephewAndColor(), Aleph::Cnode::extract_word_from_stack(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_succ_and_swap(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::find_succ_and_swap(), Aleph::HtdRbTree< Key, Compare >::findSuccAndSwap(), Aleph::HtdRbTreeRk< Key, Compare >::findSuccAndSwap(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::fix_black_condition(), Aleph::FixedStack< T >::get_last(), Aleph::FixedStack< T >::get_last(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::remove(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::remove(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::remove(), Aleph::HtdRbTree< Key, Compare >::removeAndFixBlackCondition(), Aleph::HtdRbTreeRk< Key, Compare >::removeAndFixBlackCondition(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::restore_avl_after_deletion(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::restore_avl_after_deletion(), Aleph::HtdRbTree< Key, Compare >::rotateNephewAndColor(), Aleph::HtdRbTreeRk< Key, Compare >::rotateNephewAndColor(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::search_and_stack_avl(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::search_and_stack_avl(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::search_dup_and_stack_avl(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_avl(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::Gen_Rb_Tree< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::Gen_Avl_Tree< NodeType, Key, Compare >::swapWithSuccessor(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::swapWithSuccessor(), Aleph::MonotonePolygonTriangulation::triangulate_monotone(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::update_counters_after_deletion(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_deletion(), Aleph::Gen_Avl_Tree_Rk< NodeType, Key, Compare >::update_counters_after_insertion(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_insertion().

◆ 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 535 of file tpl_arrayStack.H.

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

◆ traverse() [1/4]

template<typename T >
template<class Operation >
bool Aleph::FixedStack< T >::traverse ( Operation &&  operation = Operation())
inline

Definition at line 596 of file tpl_arrayStack.H.

References Aleph::divide_and_conquer_partition_dp().

◆ traverse() [2/4]

template<typename T >
template<class Operation >
bool Aleph::FixedStack< T >::traverse ( Operation &&  operation = Operation()) const
inline

Definition at line 589 of file tpl_arrayStack.H.

References Aleph::divide_and_conquer_partition_dp().

◆ traverse() [3/4]

template<typename T >
template<class Operation >
Aleph::FixedStack< T >::traverse ( Operation operation)
inline

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 571 of file tpl_arrayStack.H.

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

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

◆ traverse() [4/4]

template<typename T >
template<class Operation >
bool Aleph::FixedStack< T >::traverse ( Operation operation) const
inline

Member Data Documentation

◆ array

◆ dim

◆ head


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