|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Very simple queue implemented with a contiguous array. More...
#include <tpl_arrayQueue.H>
Classes | |
| struct | Iterator |
| Simple iterator on elements of a queue. 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< FixedQueue< T > > | |
| using | iterator = StlIterator< FixedQueue< T > > |
| using | const_iterator = StlConstIterator< FixedQueue< T > > |
Public Member Functions | |
| void | swap (FixedQueue &q) noexcept |
| void | empty () noexcept |
| empty the queue | |
| void | clear () noexcept |
| Empties the container. | |
| FixedQueue (size_t d=1024) | |
Construct a queue of capacity the immediately two power of d | |
| ~FixedQueue () | |
| FixedQueue (const FixedQueue &q) | |
Copy constructor: the copy holds the items of q, in the same slots. | |
| FixedQueue (FixedQueue &&q) noexcept | |
Move constructor: takes the array and the items of q. | |
| template<template< typename > class List> | |
| FixedQueue (const List< T > &l) | |
| template<class It > requires (not std::is_arithmetic_v<It> and requires (It it) { *it; ++it; it != it; }) | |
| FixedQueue (It b, It e) | |
| FixedQueue (std::initializer_list< T > l) | |
| FixedQueue & | operator= (const FixedQueue &q) |
| Copy assign. | |
| FixedQueue & | operator= (FixedQueue &&q) noexcept |
| Move assign. | |
| T & | put (const T &item) noexcept |
| Put an item into the queue by copy. | |
| T & | put (T &&item) noexcept |
See put(const T& item). | |
| T & | append (const T &item) noexcept |
See put(const T& item). | |
| T & | append (T &&item) noexcept |
See put(const T& item). | |
| T & | insert (const T &item) noexcept |
See put(const T& item). | |
| T & | insert (T &&item) noexcept |
See put(const T& item). | |
| T & | putn (const size_t n) noexcept |
Put n cells to the queue in constant time. | |
| T | get () noexcept |
| Remove the oldest item of the queue. | |
| T & | getn (const size_t n) noexcept |
| Remove in constant time the n oldest items of the queue. | |
| T & | front (const size_t i=0) noexcept |
| Return the i-th oldest item. | |
| const T & | front (const size_t i=0) const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| T & | rear (const size_t i=0) noexcept |
| Return the i-th youngest item. | |
| const T & | rear (const size_t i=0) const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| constexpr size_t | size () const noexcept |
| Return the number of items. | |
| constexpr bool | is_empty () const noexcept |
Return true if the queue is empty. | |
| constexpr size_t | capacity () const noexcept |
| Return the queue capacity (maximum number of element to be stored) | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, T &> | |
| bool | traverse (Operation &operation) noexcept(Aleph::NothrowPredicateWith< Operation &, T & >) |
Traverse all the elements from the youngest to the oldest and execute operation on each on them. | |
| 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< 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< FixedQueue< T > > | |
| bool | equal_to (const FixedQueue< T > &r) const |
Equality test between this and r. | |
Public Member Functions inherited from StlAlephIterator< FixedQueue< 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 Member Functions | |
| void | increase_index (size_t &i, const size_t inc=1) const noexcept |
| T & | rear_item (const size_t i=0) noexcept |
| const T & | rear_item (const size_t i=0) const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
Private Attributes | |
| size_t | dim |
| T * | array |
| size_t | front_index |
| size_t | rear_index |
| size_t | mask |
| size_t | num_items |
Additional Inherited Members | |
Static Public Member Functions inherited from FunctionalMethods< FixedQueue< T >, T > | |
| static FixedQueue< 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< FixedQueue< 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. | |
Very simple queue implemented with a contiguous array.
The capacity is given in construction time, but this is adjusted to the next two power immediately greater.
This queue is the fastest of Aleph-w ( \(\aleph_\omega\)), but take in account that no bound_statics cheks are performed. You must be sure that you usage is correct.
Definition at line 661 of file tpl_arrayQueue.H.
| using Aleph::FixedQueue< T >::Const_Iterator = Aleph::Const_Iterator<Iterator> |
Read-only iterator: the iterator of a constant container.
Definition at line 1045 of file tpl_arrayQueue.H.
| using Aleph::FixedQueue< T >::Item_Type = T |
Definition at line 699 of file tpl_arrayQueue.H.
|
inline |
Construct a queue of capacity the immediately two power of d
The resulting capacity will be the first number such \(2^k \geq d\),
| [in] | d | minimum capacity; 0 gives a capacity of 1. |
| overflow_error | if that power of two, or its bytes, do not fit in a size_t. |
| bad_alloc | if there is no memory for the array |
Definition at line 737 of file tpl_arrayQueue.H.
References ah_overflow_error_if, Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::dim, and Aleph::FixedQueue< T >::mask.
|
inline |
Definition at line 757 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array.
|
inline |
Copy constructor: the copy holds the items of q, in the same slots.
| [in] | q | the queue to copy. |
| bad_alloc | if there is no enough memory, or anything that the copy assignment of T throws; nothing leaks then. |
Definition at line 769 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::increase_index(), and Aleph::FixedQueue< T >::num_items.
|
inlinenoexcept |
Move constructor: takes the array and the items of q.
| [in,out] | q | the queue to move from. It is left empty, without array and with a capacity of 0, as a moved-from FixedStack: it must be assigned another queue before it takes an item. |
q is not given an array of the default capacity, which could not be allocated without memory. Definition at line 796 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::swap().
|
inline |
Definition at line 802 of file tpl_arrayQueue.H.
|
inline |
Definition at line 802 of file tpl_arrayQueue.H.
|
inline |
Definition at line 802 of file tpl_arrayQueue.H.
|
inlinenoexcept |
See put(const T& item).
Definition at line 849 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::put().
|
inlinenoexcept |
See put(const T& item).
Definition at line 855 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::put().
|
inlineconstexprnoexcept |
Return the queue capacity (maximum number of element to be stored)
Definition at line 963 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::dim.
|
inlinenoexcept |
Empties the container.
| none |
Definition at line 722 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::empty().
|
inlinenoexcept |
empty the queue
Definition at line 712 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::num_items, and Aleph::FixedQueue< T >::rear_index.
Referenced by Aleph::FixedQueue< T >::clear(), and TEST().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 925 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::mask, and Aleph::FixedQueue< T >::num_items.
|
inlinenoexcept |
Return the i-th oldest item.
| [in] | i | access position respect to oldest item |
Definition at line 917 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::mask, and Aleph::FixedQueue< T >::num_items.
|
inlinenoexcept |
Remove the oldest item of the queue.
Definition at line 889 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::increase_index(), and Aleph::FixedQueue< T >::num_items.
Referenced by WorkersSet< WorkerFct >::~WorkersSet(), main(), Aleph::DelaunayTriangulationRandomizedIncremental::operator()(), TEST(), TEST(), TEST(), TEST(), TEST(), and WorkersSet< WorkerFct >::worker_handler().
|
inlinenoexcept |
Remove in constant time the n oldest items of the queue.
| [in] | n | number of items to remove |
n entries Definition at line 904 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::increase_index(), and Aleph::FixedQueue< T >::num_items.
|
inlineprivatenoexcept |
Definition at line 674 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::dim, and Aleph::FixedQueue< T >::mask.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::get(), Aleph::FixedQueue< T >::getn(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::putn(), Aleph::FixedQueue< T >::traverse(), and Aleph::FixedQueue< T >::traverse().
|
inlinenoexcept |
See put(const T& item).
Definition at line 861 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::put().
|
inlinenoexcept |
See put(const T& item).
Definition at line 867 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::put().
|
inlineconstexprnoexcept |
Return true if the queue is empty.
Definition at line 957 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::num_items.
Referenced by WorkersSet< WorkerFct >::~WorkersSet(), main(), Aleph::DelaunayTriangulationRandomizedIncremental::operator()(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and WorkersSet< WorkerFct >::worker_handler().
|
inline |
Copy assign.
Definition at line 805 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::swap().
|
inlinenoexcept |
Move assign.
Definition at line 816 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::swap().
|
inlinenoexcept |
Put an item into the queue by copy.
| [in] | item | to put |
Definition at line 827 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::dim, Aleph::FixedQueue< T >::increase_index(), Aleph::FixedQueue< T >::num_items, and Aleph::FixedQueue< T >::rear_index.
Referenced by Aleph::FixedQueue< T >::append(), Aleph::FixedQueue< T >::append(), Aleph::FixedQueue< T >::insert(), Aleph::FixedQueue< T >::insert(), Aleph::DelaunayTriangulationRandomizedIncremental::operator()(), WorkersSet< WorkerFct >::schedule_call(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
See put(const T& item).
Definition at line 838 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::dim, Aleph::FixedQueue< T >::increase_index(), Aleph::FixedQueue< T >::num_items, and Aleph::FixedQueue< T >::rear_index.
|
inlinenoexcept |
Put n cells to the queue in constant time.
| [in] | n | number of cells |
Definition at line 877 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::dim, Aleph::FixedQueue< T >::increase_index(), Aleph::FixedQueue< T >::num_items, Aleph::FixedQueue< T >::rear_index, and Aleph::FixedQueue< T >::rear_item().
Referenced by main().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 944 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::num_items, and Aleph::FixedQueue< T >::rear_item().
|
inlinenoexcept |
Return the i-th youngest item.
| [in] | i | access position respect to youngest item |
Definition at line 936 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::num_items, and Aleph::FixedQueue< T >::rear_item().
|
inlineprivatenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 691 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::dim, Aleph::FixedQueue< T >::mask, and Aleph::FixedQueue< T >::rear_index.
|
inlineprivatenoexcept |
Definition at line 682 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::dim, Aleph::FixedQueue< T >::mask, and Aleph::FixedQueue< T >::rear_index.
Referenced by Aleph::FixedQueue< T >::putn(), Aleph::FixedQueue< T >::rear(), and Aleph::FixedQueue< T >::rear().
|
inlineconstexprnoexcept |
Return the number of items.
Definition at line 951 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::num_items.
Referenced by WorkersSet< WorkerFct >::schedule_call(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
Definition at line 701 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::dim, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::mask, Aleph::FixedQueue< T >::num_items, and Aleph::FixedQueue< T >::rear_index.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::operator=(), Aleph::FixedQueue< T >::operator=(), and TEST().
|
inlinenoexcept |
See traverse(Operation & operation).
Definition at line 1006 of file tpl_arrayQueue.H.
|
inlinenoexcept |
See traverse(Operation & operation).
Definition at line 1015 of file tpl_arrayQueue.H.
|
inlinenoexcept |
See traverse(Operation & operation).
Definition at line 991 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::increase_index(), and Aleph::FixedQueue< T >::num_items.
|
inlinenoexcept |
Traverse all the elements from the youngest to the oldest and execute operation on each on them.
| [in] | operation | to be performed on each element |
true if operation was executed on all elements; false otherwise. Definition at line 977 of file tpl_arrayQueue.H.
References Aleph::FixedQueue< T >::array, Aleph::FixedQueue< T >::front_index, Aleph::FixedQueue< T >::increase_index(), and Aleph::FixedQueue< T >::num_items.
|
private |
Definition at line 668 of file tpl_arrayQueue.H.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::~FixedQueue(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::get(), Aleph::FixedQueue< T >::getn(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::rear_item(), Aleph::FixedQueue< T >::rear_item(), Aleph::FixedQueue< T >::swap(), Aleph::FixedQueue< T >::traverse(), and Aleph::FixedQueue< T >::traverse().
|
private |
Definition at line 667 of file tpl_arrayQueue.H.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::capacity(), Aleph::FixedQueue< T >::increase_index(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::putn(), Aleph::FixedQueue< T >::rear_item(), Aleph::FixedQueue< T >::rear_item(), and Aleph::FixedQueue< T >::swap().
|
private |
Definition at line 669 of file tpl_arrayQueue.H.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::empty(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::get(), Aleph::FixedQueue< T >::getn(), Aleph::FixedQueue< T >::swap(), Aleph::FixedQueue< T >::traverse(), and Aleph::FixedQueue< T >::traverse().
|
private |
Definition at line 671 of file tpl_arrayQueue.H.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::increase_index(), Aleph::FixedQueue< T >::rear_item(), Aleph::FixedQueue< T >::rear_item(), and Aleph::FixedQueue< T >::swap().
|
private |
Definition at line 672 of file tpl_arrayQueue.H.
Referenced by Aleph::FixedQueue< T >::FixedQueue(), Aleph::FixedQueue< T >::empty(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::front(), Aleph::FixedQueue< T >::get(), Aleph::FixedQueue< T >::getn(), Aleph::FixedQueue< T >::is_empty(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::putn(), Aleph::FixedQueue< T >::rear(), Aleph::FixedQueue< T >::rear(), Aleph::FixedQueue< T >::size(), Aleph::FixedQueue< T >::swap(), Aleph::FixedQueue< T >::traverse(), and Aleph::FixedQueue< T >::traverse().
|
private |
Definition at line 670 of file tpl_arrayQueue.H.
Referenced by Aleph::FixedQueue< T >::empty(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::put(), Aleph::FixedQueue< T >::putn(), Aleph::FixedQueue< T >::rear_item(), Aleph::FixedQueue< T >::rear_item(), and Aleph::FixedQueue< T >::swap().