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

Dynamic queue of elements of generic type T based on single linked list. More...

#include <tpl_dynListQueue.H>

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

Classes

struct  Iterator
 Iterator on elements of a queue. More...
 

Public Types

using Set_Type = DynListQueue
 
using Item_Type = T
 The type of set.
 
using Key_Type = T
 Alias for the item type.
 
using Const_Iterator = Aleph::Const_Iterator< Iterator >
 Read-only iterator: the iterator of a constant container.
 
- Public Types inherited from StlAlephIterator< DynListQueue< T > >
using iterator = StlIterator< DynListQueue< T > >
 
using const_iterator = StlConstIterator< DynListQueue< T > >
 

Public Member Functions

void swap (DynListQueue &__q) noexcept
 Swap this with __q in constant time.
 
 DynListQueue () noexcept
 Construct an empty queue.
 
 DynListQueue (const DynListQueue &__q)
 Construct a copy of __q
 
 DynListQueue (DynListQueue &&__q) noexcept
 Construct in constant time a queue from __q
 
template<template< typename > class List>
 DynListQueue (const List< T > &l)
 
template<class It >
requires (not std::is_arithmetic_v<It> and requires (It it) { *it; ++it; it != it; })
 DynListQueue (It b, It e)
 
 DynListQueue (std::initializer_list< T > l)
 
DynListQueue & operator= (const DynListQueue &rhs)
 Assign to this a copy of rhs
 
DynListQueue & operator= (DynListQueue &&rhs) noexcept
 Assign to this by moving rsh in constant time the queue rhs
 
size_t size () const noexcept
 Return the number of elements.
 
bool is_empty () const noexcept
 Return true if this is empty.
 
T & put (const T &data)
 The type of element.
 
T & put (T &&data)
 Put an item by moving.
 
T & append (const T &data)
 
T & append (T &&data)
 
T & insert (const T &data)
 
T & insert (T &&data)
 
template<typename... Args>
T & emplace (Args &&... args)
 Construct an item in place at the rear of the queue.
 
T pop ()
 Alias for get() - removes and returns the front item.
 
void clear () noexcept
 Empties the container.
 
T get ()
 Remove the oldest item of the queue.
 
T & front ()
 Return a modifiable reference to the oldest item in the queue.
 
const T & front () const
 Return a const reference to the oldest item in the queue.
 
T & rear ()
 Return a modifiable reference to the youngest item in the queue.
 
const T & rear () const
 Return a const reference to the youngest item in the queue.
 
void empty () noexcept
 Empty the queue.
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, T &>
bool traverse (Operation &operation) noexcept(noexcept(q.traverse(operation)))
 Traverse all the elements from the oldest (front) to the youngest (rear) and execute operation on each of them.
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, const T &>
bool traverse (Operation &operation) const noexcept(noexcept(q.traverse(operation)))
 See traverse(Operation & operation).
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, const T &>
bool traverse (Operation &&operation=Operation()) const noexcept(noexcept(q.traverse(operation)))
 See traverse (Operation & operation).
 
template<class Operation >
requires Aleph::PredicateWith<Operation &, T &>
bool traverse (Operation &&operation=Operation()) noexcept(noexcept(q.traverse(operation)))
 See traverse (Operation & operation).
 
T * search (const T &key) noexcept(noexcept(static_cast< bool >(std::declval< const T & >()==std::declval< const T & >())))
 Search for an item in the queue using equality comparison.
 
const T * search (const T &key) const noexcept(noexcept(static_cast< bool >(std::declval< const T & >()==std::declval< const T & >())))
 See search(const T & key).
 
- Public Member Functions inherited from LocateFunctions< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< 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< DynListQueue< T > >
bool equal_to (const DynListQueue< T > &r) const
 Equality test between this and r.
 
- Public Member Functions inherited from StlAlephIterator< DynListQueue< 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 Types

using Base = DynList< T >
 

Private Attributes

DynList< T > q
 

Additional Inherited Members

- Static Public Member Functions inherited from FunctionalMethods< DynListQueue< T >, T >
static DynListQueue< 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< DynListQueue< 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::DynListQueue< T >

Dynamic queue of elements of generic type T based on single linked list.


See also
DynDlist DynList

Definition at line 65 of file tpl_dynListQueue.H.

Member Typedef Documentation

◆ Base

template<typename T >
using Aleph::DynListQueue< T >::Base = DynList<T>
private

Definition at line 74 of file tpl_dynListQueue.H.

◆ Const_Iterator

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

Definition at line 336 of file tpl_dynListQueue.H.

◆ Item_Type

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

The type of set.

Definition at line 127 of file tpl_dynListQueue.H.

◆ Key_Type

template<typename T >
using Aleph::DynListQueue< T >::Key_Type = T

Alias for the item type.

Definition at line 315 of file tpl_dynListQueue.H.

◆ Set_Type

template<typename T >
using Aleph::DynListQueue< T >::Set_Type = DynListQueue

Definition at line 125 of file tpl_dynListQueue.H.

Constructor & Destructor Documentation

◆ DynListQueue() [1/6]

template<typename T >
Aleph::DynListQueue< T >::DynListQueue ( )
inlinenoexcept

Construct an empty queue.

Definition at line 85 of file tpl_dynListQueue.H.

◆ DynListQueue() [2/6]

template<typename T >
Aleph::DynListQueue< T >::DynListQueue ( const DynListQueue< T > &  __q)
inline

Construct a copy of __q

Definition at line 88 of file tpl_dynListQueue.H.

◆ DynListQueue() [3/6]

template<typename T >
Aleph::DynListQueue< T >::DynListQueue ( DynListQueue< T > &&  __q)
inlinenoexcept

Construct in constant time a queue from __q

Definition at line 94 of file tpl_dynListQueue.H.

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

◆ DynListQueue() [4/6]

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

Definition at line 99 of file tpl_dynListQueue.H.

◆ DynListQueue() [5/6]

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

Definition at line 99 of file tpl_dynListQueue.H.

◆ DynListQueue() [6/6]

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

Definition at line 99 of file tpl_dynListQueue.H.

Member Function Documentation

◆ append() [1/2]

template<typename T >
T & Aleph::DynListQueue< T >::append ( const T &  data)
inline

Definition at line 153 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::put().

Referenced by TEST_F().

◆ append() [2/2]

template<typename T >
T & Aleph::DynListQueue< T >::append ( T &&  data)
inline

Definition at line 155 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::put().

◆ clear()

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

◆ emplace()

template<typename T >
template<typename... Args>
T & Aleph::DynListQueue< T >::emplace ( Args &&...  args)
inline

Construct an item in place at the rear of the queue.

Constructs the item using the provided arguments and moves it into the queue.

Parameters
[in]argsarguments to forward to the constructor of T
Returns
a modifiable reference to the newly constructed item
Exceptions
bad_allocif there is no enough memory

Definition at line 177 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::put().

Referenced by TEST(), TEST(), and TEST().

◆ empty()

◆ front() [1/2]

template<typename T >
T & Aleph::DynListQueue< T >::front ( )
inline

◆ front() [2/2]

template<typename T >
const T & Aleph::DynListQueue< T >::front ( ) const
inline

Return a const reference to the oldest item in the queue.

Returns
a const reference to the front item
Exceptions
underflow_errorif the queue is empty

Definition at line 220 of file tpl_dynListQueue.H.

References Aleph::DynList< T >::get_first(), and Aleph::DynListQueue< T >::q.

◆ get()

template<typename T >
T Aleph::DynListQueue< T >::get ( )
inline

Remove the oldest item of the queue.

The item moves out before it leaves the queue, so that if its move throws the queue keeps it, and its size.

Returns
the removed item
Exceptions
underflow_errorif the queue is empty

Definition at line 200 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q, and Aleph::DynList< T >::remove_first().

Referenced by Aleph::GenBinHeap< NodeType, Key, Compare >::__level_traverse(), Aleph::Breadth_First_Traversal< GT, Operation, SA >::bft(), Aleph::breadth_first_traversal(), Aleph::build_level_graph(), Aleph::Network_Simplex< Net >::build_spanning_tree(), Aleph::Find_Breadth_First_Spanning_Tree< GT, SA >::build_tree(), Aleph::capacity_scaling_maximum_flow(), Aleph::check_baseball_elimination(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::check_beyond_max(), Aleph::compute_bipartite_all_components(), compute_min_cut_capacity(), demo_comparison(), demo_queue(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::expand_backward(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::expand_frontier(), Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::find_augmenting_path(), Aleph::find_breadth_first_spanning_tree(), Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), Aleph::find_path_breadth_first(), Aleph::k_shortest_paths_detail::for_each_left_out(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::get_from_queue(), Aleph::hlpp_maximum_flow(), Aleph::hopcroft_karp_matching(), Aleph::Random_Digraph< GT, Init_Node, Init_Arc >::join_through_a_path(), Aleph::level_traverse(), Aleph::Tree_Node< T >::level_traverse(), Aleph::levelOrder(), main(), Aleph::Q_Topological_Sort< GT, Itor, SA >::perform(), Aleph::Network_Simplex< Net >::pivot_tree(), Aleph::DynListQueue< T >::pop(), Aleph::Q_Topological_Sort< GT, Itor, SA >::ranks(), Aleph::segment_image(), Aleph::solve_project_selection(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::substage_scan(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ insert() [1/2]

template<typename T >
T & Aleph::DynListQueue< T >::insert ( const T &  data)
inline

Definition at line 160 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::put().

Referenced by compute_min_cut_capacity(), TEST(), and TEST_F().

◆ insert() [2/2]

template<typename T >
T & Aleph::DynListQueue< T >::insert ( T &&  data)
inline

Definition at line 162 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::put().

◆ is_empty()

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

Return true if this is empty.

Definition at line 123 of file tpl_dynListQueue.H.

References Aleph::HTList::is_empty(), and Aleph::DynListQueue< T >::q.

Referenced by Aleph::GenBinHeap< NodeType, Key, Compare >::__level_traverse(), Aleph::Breadth_First_Traversal< GT, Operation, SA >::bft(), Aleph::breadth_first_traversal(), Aleph::build_level_graph(), Aleph::Network_Simplex< Net >::build_spanning_tree(), Aleph::Find_Breadth_First_Spanning_Tree< GT, SA >::build_tree(), Aleph::capacity_scaling_maximum_flow(), Aleph::check_baseball_elimination(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::check_beyond_max(), Aleph::compute_bipartite_all_components(), compute_min_cut_capacity(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::compute_nodes_weights(), demo_comparison(), demo_queue(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::expand_backward(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::expand_frontier(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::faster_find_negative_cycle(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::faster_find_negative_cycle(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::faster_paint_spanning_tree(), Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::find_augmenting_path(), Aleph::find_breadth_first_spanning_tree(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::find_path(), Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), Aleph::find_path_breadth_first(), Aleph::k_shortest_paths_detail::for_each_left_out(), Aleph::hlpp_maximum_flow(), Aleph::hopcroft_karp_matching(), Aleph::Random_Digraph< GT, Init_Node, Init_Arc >::join_through_a_path(), Aleph::level_traverse(), Aleph::Tree_Node< T >::level_traverse(), Aleph::levelOrder(), main(), Aleph::Q_Topological_Sort< GT, Itor, SA >::perform(), Aleph::Network_Simplex< Net >::pivot_tree(), Aleph::Q_Topological_Sort< GT, Itor, SA >::ranks(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::run_stage(), Aleph::segment_image(), Aleph::solve_project_selection(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::substage_scan(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ operator=() [1/2]

template<typename T >
DynListQueue & Aleph::DynListQueue< T >::operator= ( const DynListQueue< T > &  rhs)
inline

Assign to this a copy of rhs

Definition at line 102 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q.

◆ operator=() [2/2]

template<typename T >
DynListQueue & Aleph::DynListQueue< T >::operator= ( DynListQueue< T > &&  rhs)
inlinenoexcept

Assign to this by moving rsh in constant time the queue rhs

Definition at line 113 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q, and Aleph::DynList< T >::swap().

◆ pop()

template<typename T >
T Aleph::DynListQueue< T >::pop ( )
inline

Alias for get() - removes and returns the front item.

Definition at line 183 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::get().

Referenced by TEST(), TEST(), and TEST().

◆ put() [1/2]

template<typename T >
T & Aleph::DynListQueue< T >::put ( const T &  data)
inline

The type of element.

Put an item by copy

Parameters
[in]datato be copied and put
Returns
a modifiable reference to just recent copy of inserted item
Exceptions
bad_allocif there is no enough memory

Definition at line 136 of file tpl_dynListQueue.H.

References Aleph::DynList< T >::append(), and Aleph::DynListQueue< T >::q.

Referenced by Aleph::GenBinHeap< NodeType, Key, Compare >::__level_traverse(), Aleph::DynListQueue< T >::append(), Aleph::DynListQueue< T >::append(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::assign_label_s(), Aleph::Breadth_First_Traversal< GT, Operation, SA >::bft(), Aleph::breadth_first_traversal(), Aleph::build_level_graph(), Aleph::Network_Simplex< Net >::build_spanning_tree(), Aleph::Find_Breadth_First_Spanning_Tree< GT, SA >::build_tree(), Aleph::capacity_scaling_maximum_flow(), Aleph::check_baseball_elimination(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::check_beyond_max(), Aleph::compute_bipartite_all_components(), compute_min_cut_capacity(), demo_comparison(), demo_queue(), Aleph::DynListQueue< T >::emplace(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::expand_frontier(), Aleph::blossom_detail::Edmonds_Blossom_Matcher< GT, SA >::find_augmenting_path(), Aleph::find_breadth_first_spanning_tree(), Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::find_path(), Aleph::Find_Path_Breadth_First< GT, Itor, SA >::find_path(), Aleph::find_path_breadth_first(), Aleph::k_shortest_paths_detail::for_each_left_out(), Aleph::hlpp_maximum_flow(), Aleph::hopcroft_karp_matching(), Aleph::DynListQueue< T >::insert(), Aleph::DynListQueue< T >::insert(), Aleph::Random_Digraph< GT, Init_Node, Init_Arc >::join_through_a_path(), Aleph::level_traverse(), Aleph::Tree_Node< T >::level_traverse(), Aleph::levelOrder(), main(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::make_blossom(), Aleph::Q_Topological_Sort< GT, Itor, SA >::perform(), Aleph::Network_Simplex< Net >::pivot_tree(), QueueTheadsPool< T >::put(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::put_in_queue(), Aleph::Q_Topological_Sort< GT, Itor, SA >::ranks(), Aleph::segment_image(), DynListQueueTest::SetUp(), Aleph::solve_project_selection(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::visit_backward().

◆ put() [2/2]

template<typename T >
T & Aleph::DynListQueue< T >::put ( T &&  data)
inline

Put an item by moving.

Parameters
[in]datato be moved and put
Returns
a modifiable reference to just recently moved inserted item
Exceptions
bad_allocif there is no enough memory

Definition at line 148 of file tpl_dynListQueue.H.

References Aleph::DynList< T >::append(), and Aleph::DynListQueue< T >::q.

◆ rear() [1/2]

template<typename T >
T & Aleph::DynListQueue< T >::rear ( )
inline

Return a modifiable reference to the youngest item in the queue.

Returns
a modifiable reference to the rear item
Exceptions
underflow_errorif the queue is empty

Definition at line 230 of file tpl_dynListQueue.H.

References Aleph::DynList< T >::get_last(), and Aleph::DynListQueue< T >::q.

Referenced by demo_queue(), main(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ rear() [2/2]

template<typename T >
const T & Aleph::DynListQueue< T >::rear ( ) const
inline

Return a const reference to the youngest item in the queue.

Returns
a const reference to the rear item
Exceptions
underflow_errorif the queue is empty

Definition at line 240 of file tpl_dynListQueue.H.

References Aleph::DynList< T >::get_last(), and Aleph::DynListQueue< T >::q.

◆ search() [1/2]

template<typename T >
const T * Aleph::DynListQueue< T >::search ( const T &  key) const
inlinenoexcept

See search(const T & key).

Definition at line 308 of file tpl_dynListQueue.H.

References LocateFunctions< DynListQueue< T >, T >::find_ptr().

◆ search() [2/2]

template<typename T >
T * Aleph::DynListQueue< T >::search ( const T &  key)
inlinenoexcept

Search for an item in the queue using equality comparison.

Performs a linear search O(n) from front to rear.

Parameters
[in]keythe value to search for
Returns
pointer to the item if found, nullptr otherwise

Definition at line 301 of file tpl_dynListQueue.H.

References LocateFunctions< DynListQueue< T >, T >::find_ptr().

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ size()

◆ swap()

◆ traverse() [1/4]

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

See traverse (Operation & operation).

Definition at line 279 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q, and GenericTraverse< Container >::traverse().

◆ traverse() [2/4]

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

See traverse (Operation & operation).

Definition at line 288 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q, and GenericTraverse< Container >::traverse().

◆ traverse() [3/4]

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

See traverse(Operation & operation).

Definition at line 270 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q, and GenericTraverse< Container >::traverse().

◆ traverse() [4/4]

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

Traverse all the elements from the oldest (front) to the youngest (rear) and execute operation on each of them.

Parameters
[in]operationto be performed on each element
Returns
true if operation was executed on all elements; false otherwise.

Definition at line 261 of file tpl_dynListQueue.H.

References Aleph::DynListQueue< T >::q, and GenericTraverse< Container >::traverse().

Referenced by TEST_F().

Member Data Documentation

◆ q


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