fiber
Loading...
Searching...
No Matches
fiber::DualArrayList< T, N > Class Template Reference

Two ArrayLists that share the same memory buffer. More...

#include <DualArrayList.hpp>

Public Types

using value_type = T
 
using size_type = std::size_t
 
using reference = T&
 
using const_reference = const T&
 
using pointer = T*
 
using const_pointer = const T*
 
using left_iterator = T*
 
using left_const_iterator = const T*
 
using right_iterator = std::reverse_iterator<left_iterator>
 
using right_const_iterator = std::reverse_iterator<left_const_iterator>
 
using left_range = std::ranges::subrange<left_iterator>
 
using left_const_range = std::ranges::subrange<left_const_iterator>
 
using right_range = std::ranges::subrange<right_iterator>
 
using right_const_range = std::ranges::subrange<right_const_iterator>
 

Public Member Functions

 DualArrayList ()=default
 default constructs two empty lists
 
template<size_t N1>
 DualArrayList (const DualArrayList< T, N1 > &other)
 Copy constructs both lists like from the other dual list.
 
template<size_t N1>
DualArrayListoperator= (const DualArrayList< T, N1 > &other)
 Copy assigns both lists like from the other dual list.
 
constexpr size_type left_size () const
 Returns the size of the left list.
 
constexpr size_type right_size () const
 Returns the size of the right list.
 
constexpr size_type size () const
 Returns the combined size of both lists.
 
constexpr size_type max_size () const
 Returns the maximal size - is the same for left and right.
 
constexpr size_type left_capacity () const
 Returns the capacity of the left list.
 
constexpr size_type right_capacity () const
 Returns the capacity of the right list.
 
constexpr size_type reserve () const
 Returns the size of the reserve (aka.) number of free elements that has not been claimed by either list.
 
constexpr bool left_empty () const
 Returns true if the left list is empty.
 
constexpr bool right_empty () const
 returns true if the right list is empty
 
constexpr bool empty () const
 returns true if both lists are empty
 
constexpr bool full () const
 returns true if the lists are full, all elements have been taken by either side, no more elements can be emplaced.
 
constexpr pointer data ()
 
constexpr const_pointer data () const
 
constexpr const_pointer cdata () const
 
constexpr left_iterator left_begin ()
 returns an iterator to the beginning of the left list
 
constexpr left_const_iterator left_begin () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr left_const_iterator left_cbegin () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr right_iterator right_begin ()
 returns an iterator ot the beginning of the right list
 
constexpr right_const_iterator right_begin () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr right_const_iterator right_cbegin () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr left_iterator left_end ()
 returns an iterator past the end of the left list
 
constexpr left_const_iterator left_end () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr left_const_iterator left_cend () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr right_iterator right_end ()
 returns an iterator past the end of the right list
 
constexpr right_const_iterator right_end () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr right_const_iterator right_cend () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr left_range left_subrange ()
 returns the left list as a subrange
 
constexpr left_const_range left_subrange () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr left_const_range left_csubrange () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr right_range right_subrange ()
 returns the right list as a subrange
 
constexpr right_const_range right_subrange () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr right_const_range right_csubrange () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr reference left_front ()
 Returns a reference of the first element in the left list.
 
constexpr const_reference left_front () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr reference left_back ()
 Returns a reference of the last element in the left list.
 
constexpr const_reference left_back () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr reference right_front ()
 Returns a reference of the first element in the right list.
 
constexpr const_reference right_front () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr reference right_back ()
 Returns a reference of the last element in the right list.
 
constexpr const_reference right_back () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr reference left_at (const UInt i)
 Returns a reference to the element in the left list at the position with the given index.
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr const_reference left_at (const UInt i) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr reference right_at (const UInt i)
 Returns a reference to the element in the right list at the position with the given index.
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr const_reference right_at (const UInt i) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr reference left_at (SInt si)
 Returns a reference to the element in the left list at the wrapped position with the given index.
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr const_reference left_at (const SInt si) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr reference right_at (SInt si)
 Returns a reference to the element in the right list at the wrapped position with the given index.
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr const_reference right_at (const SInt si) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
ArrayList< T, N > left_at (const ArrayList< bool, N > &mask) const
 Masked indexing of the left list.
 
ArrayList< T, N > right_at (const ArrayList< bool, N > &mask) const
 Masked indexing of the right list.
 
template<class Int>
requires std::is_integral_v<Int>
ArrayList< T, N > left_at (const ArrayList< Int, N > &indices) const
 constructs a list of from the left list at the provided list of indices
 
template<class Int>
requires std::is_integral_v<Int>
ArrayList< T, N > right_at (const ArrayList< Int, N > &indices) const
 constructs a list of from the right list at the provided list of indices
 
template<class... Args>
reference left_emplace_back (Args &&... args)
 emplaces (aka. pushes) an element to the back of the left list
 
template<class... Args>
reference right_emplace_back (Args &&... args)
 emplaces (aka. pushes) an element to the back of the right list
 
void left_clear ()
 clears the left list
 
void right_clear ()
 clears the right list
 
void clear ()
 clears both lists
 
template<std::convertible_to< T > Ta>
void left_append (const size_type count, const Ta &value)
 appends value count many times to the left list
 
template<std::convertible_to< T > Ta>
void right_append (const size_type count, const Ta &value)
 appends value count many times to the right list
 
template<std::convertible_to< T > Ta>
void left_assign (const size_type count, const Ta &value)
 assigns a value count many times to the left list.
 
template<std::convertible_to< T > Ta>
void right_assign (const size_type count, const Ta &value)
 assigns a value count many times to the right list.
 
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void left_append (Itr first, Itr last)
 appends a range of elements defined by foreward iterators using the closed-open principle [first, last)
 
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void right_append (Itr first, Itr last)
 
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void left_assign (Itr first, Itr last)
 
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void right_assign (Itr first, Itr last)
 
template<std::convertible_to< T > Ta>
void left_append (std::initializer_list< Ta > ilist)
 
template<std::convertible_to< T > Ta>
void right_append (std::initializer_list< Ta > ilist)
 
template<std::convertible_to< T > Ta>
void left_assign (std::initializer_list< Ta > ilist)
 
template<std::convertible_to< T > Ta>
void right_assign (std::initializer_list< Ta > ilist)
 
template<std::ranges::forward_range Range>
void left_append (const Range &range)
 
template<std::ranges::forward_range Range>
void right_append (const Range &range)
 
template<std::ranges::forward_range Range>
void left_assign (const Range &range)
 
template<std::ranges::forward_range Range>
void right_assign (const Range &range)
 
template<size_t N1>
void assign (const DualArrayList< T, N1 > &other)
 
constexpr size_type left_to_index (const left_const_iterator pos) const
 
constexpr size_type right_to_index (const right_const_iterator pos) const
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr left_iterator left_to_iterator (const UInt pos)
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr right_iterator right_to_iterator (const UInt pos)
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr left_iterator left_to_iterator (const SInt pos)
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr right_iterator right_to_iterator (const SInt pos)
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr left_const_iterator left_to_iterator (const UInt pos) const
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr right_const_iterator right_to_iterator (const UInt pos) const
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr left_const_iterator left_to_iterator (const SInt pos) const
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr right_const_iterator right_to_iterator (const SInt pos) const
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr left_const_iterator left_to_const_iterator (const UInt pos) const
 
template<class UInt>
requires std::is_unsigned_v<UInt>
constexpr right_const_iterator right_to_const_iterator (const UInt pos) const
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr left_const_iterator left_to_const_iterator (const SInt pos) const
 
template<class SInt>
requires std::is_signed_v<SInt>
constexpr right_const_iterator right_to_const_iterator (const SInt pos) const
 
constexpr left_iterator left_unconst (const left_const_iterator pos)
 
constexpr right_iterator right_unconst (const right_const_iterator pos)
 
template<std::convertible_to< T > Ta>
left_iterator left_insert (const left_const_iterator pos, const Ta &value)
 
template<std::convertible_to< T > Ta>
right_iterator right_insert (const right_const_iterator pos, const Ta &value)
 
template<std::convertible_to< T > Ta>
left_iterator left_insert (const left_const_iterator pos, Ta &&value)
 
template<std::convertible_to< T > Ta>
right_iterator right_insert (const right_const_iterator pos, Ta &&value)
 
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
left_iterator left_insert (const left_const_iterator pos, Itr first, Itr last)
 
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
right_iterator right_insert (const right_const_iterator pos, Itr first, Itr last)
 
template<std::ranges::forward_range Range>
left_iterator left_insert (const left_const_iterator pos, const Range &range)
 
template<std::ranges::forward_range Range>
right_iterator right_insert (const right_const_iterator pos, const Range &range)
 
template<std::convertible_to< T > Ti>
left_iterator left_insert (const left_const_iterator pos, std::initializer_list< Ti > ilist)
 
template<std::convertible_to< T > Ti>
right_iterator right_insert (const right_const_iterator pos, std::initializer_list< Ti > ilist)
 
template<std::integral Int>
left_iterator left_insert (const Int index, const T &value)
 Inserts a value into the left list at the index position.
 
template<std::integral Int>
right_iterator right_insert (const Int index, const T &value)
 Inserts a value into the right list at the index position.
 
template<std::integral Int>
left_iterator left_insert (const Int index, T &&value)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<std::integral Int>
right_iterator right_insert (const Int index, T &&value)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<std::integral Int, std::ranges::forward_range Range>
left_iterator left_insert (const Int index, const Range &range)
 
template<std::integral Int, std::ranges::forward_range Range>
right_iterator right_insert (const Int index, const Range &range)
 
template<std::integral Int, std::forward_iterator Itr>
left_iterator left_insert (const Int index, Itr first, Itr last)
 
template<std::integral Int, std::forward_iterator Itr>
right_iterator right_insert (const Int index, Itr first, Itr last)
 
template<std::integral Int, std::convertible_to< T > Ti>
left_iterator left_insert (const Int index, std::initializer_list< Ti > ilist)
 
template<std::integral Int, std::convertible_to< T > Ti>
right_iterator right_insert (const right_const_iterator index, std::initializer_list< Ti > ilist)
 
left_iterator left_erase (left_const_iterator cpos)
 
right_iterator right_erase (right_const_iterator cpos)
 
template<std::integral Int>
left_iterator left_erase (const Int pos)
 
template<std::integral Int>
right_iterator right_erase (const Int pos)
 
left_iterator left_erase (left_const_iterator first, left_const_iterator last)
 
right_iterator right_erase (right_const_iterator first, right_const_iterator last)
 
template<class Callable>
std::size_t left_erase_if (Callable &&f)
 
template<class Callable>
std::size_t right_erase_if (Callable &&f)
 
template<class Int>
requires std::is_integral_v<Int>
left_iterator left_erase (Int first, Int last)
 
template<class Int>
requires std::is_integral_v<Int>
right_iterator right_erase (Int first, Int last)
 
void left_pop_back ()
 
void right_pop_back ()
 
template<class Function>
constexpr void left_for_each (Function &&function)
 
template<class Function>
constexpr void right_for_each (Function &&function)
 

Detailed Description

template<class T, std::size_t N>
class fiber::DualArrayList< T, N >

Two ArrayLists that share the same memory buffer.

Two ArrayLists that internally grow in two different directions from opposite ends of the buffer. Internally the left array list grows to the right and the right array list grows to the back.

+---------------------+---------+----------------------+
| left array list --> | reserve | <-- right array list |
+---------------------+---------+----------------------+
constexpr size_type reserve() const
Returns the size of the reserve (aka.) number of free elements that has not been claimed by either li...
Definition DualArrayList.hpp:99

However, both array lists look like normal array lists. Both emplace back in the growing direction. The left has normal pointer like iterators, and the right uses internally reverse iterators.

Template Parameters
Tthe value types of the container
Nthe maximum size of the container

Member Typedef Documentation

◆ const_pointer

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::const_pointer = const T*

◆ const_reference

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::const_reference = const T&

◆ left_const_iterator

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::left_const_iterator = const T*

◆ left_const_range

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::left_const_range = std::ranges::subrange<left_const_iterator>

◆ left_iterator

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::left_iterator = T*

◆ left_range

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::left_range = std::ranges::subrange<left_iterator>

◆ pointer

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::pointer = T*

◆ reference

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::reference = T&

◆ right_const_iterator

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::right_const_iterator = std::reverse_iterator<left_const_iterator>

◆ right_const_range

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::right_const_range = std::ranges::subrange<right_const_iterator>

◆ right_iterator

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::right_iterator = std::reverse_iterator<left_iterator>

◆ right_range

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::right_range = std::ranges::subrange<right_iterator>

◆ size_type

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::size_type = std::size_t

◆ value_type

template<class T, std::size_t N>
using fiber::DualArrayList< T, N >::value_type = T

Constructor & Destructor Documentation

◆ DualArrayList() [1/2]

template<class T, std::size_t N>
fiber::DualArrayList< T, N >::DualArrayList ( )
default

default constructs two empty lists

◆ DualArrayList() [2/2]

template<class T, std::size_t N>
template<size_t N1>
fiber::DualArrayList< T, N >::DualArrayList ( const DualArrayList< T, N1 > & other)
inline

Copy constructs both lists like from the other dual list.

Member Function Documentation

◆ assign()

template<class T, std::size_t N>
template<size_t N1>
void fiber::DualArrayList< T, N >::assign ( const DualArrayList< T, N1 > & other)
inline

◆ cdata()

template<class T, std::size_t N>
const_pointer fiber::DualArrayList< T, N >::cdata ( ) const
inlineconstexpr

◆ clear()

template<class T, std::size_t N>
void fiber::DualArrayList< T, N >::clear ( )
inline

clears both lists

◆ data() [1/2]

template<class T, std::size_t N>
pointer fiber::DualArrayList< T, N >::data ( )
inlineconstexpr

◆ data() [2/2]

template<class T, std::size_t N>
const_pointer fiber::DualArrayList< T, N >::data ( ) const
inlineconstexpr

◆ empty()

template<class T, std::size_t N>
bool fiber::DualArrayList< T, N >::empty ( ) const
inlineconstexpr

returns true if both lists are empty

◆ full()

template<class T, std::size_t N>
bool fiber::DualArrayList< T, N >::full ( ) const
inlineconstexpr

returns true if the lists are full, all elements have been taken by either side, no more elements can be emplaced.

◆ left_append() [1/4]

template<class T, std::size_t N>
template<std::ranges::forward_range Range>
void fiber::DualArrayList< T, N >::left_append ( const Range & range)
inline

◆ left_append() [2/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::left_append ( const size_type count,
const Ta & value )
inline

appends value count many times to the left list

Parameters
counthow often value should be left_emplaced_back()
valuethe value to be created

◆ left_append() [3/4]

template<class T, std::size_t N>
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void fiber::DualArrayList< T, N >::left_append ( Itr first,
Itr last )
inline

appends a range of elements defined by foreward iterators using the closed-open principle [first, last)

◆ left_append() [4/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::left_append ( std::initializer_list< Ta > ilist)
inline

◆ left_assign() [1/4]

template<class T, std::size_t N>
template<std::ranges::forward_range Range>
void fiber::DualArrayList< T, N >::left_assign ( const Range & range)
inline

◆ left_assign() [2/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::left_assign ( const size_type count,
const Ta & value )
inline

assigns a value count many times to the left list.

◆ left_assign() [3/4]

template<class T, std::size_t N>
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void fiber::DualArrayList< T, N >::left_assign ( Itr first,
Itr last )
inline

◆ left_assign() [4/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::left_assign ( std::initializer_list< Ta > ilist)
inline

◆ left_at() [1/6]

template<class T, std::size_t N>
ArrayList< T, N > fiber::DualArrayList< T, N >::left_at ( const ArrayList< bool, N > & mask) const
inline

Masked indexing of the left list.

Parameters
maskthe mask that selects which elements to get. true will be included, false excluded
Returns
A ArrayList that contains all values where of this where mask is true

◆ left_at() [2/6]

template<class T, std::size_t N>
template<class Int>
requires std::is_integral_v<Int>
ArrayList< T, N > fiber::DualArrayList< T, N >::left_at ( const ArrayList< Int, N > & indices) const
inline

constructs a list of from the left list at the provided list of indices

Template Parameters
Inta generic integer
Parameters
indicesa list of indices that should be extracted
Returns
a ArrayList containing all the elements from this that are contained in the indices

◆ left_at() [3/6]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
const_reference fiber::DualArrayList< T, N >::left_at ( const SInt si) const
inlineconstexpr

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

◆ left_at() [4/6]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
reference fiber::DualArrayList< T, N >::left_at ( const UInt i)
inlineconstexpr

Returns a reference to the element in the left list at the position with the given index.

Template Parameters
UIntAn unsigned integer/integral type
Parameters
ithe index of the element to retreive
Returns
a reference to the element at position i
Exceptions
Ifthe assertion level is at least O1 throws an assertion failure on out of bounds access

◆ left_at() [5/6]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
const_reference fiber::DualArrayList< T, N >::left_at ( const UInt i) const
inlineconstexpr

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

◆ left_at() [6/6]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
reference fiber::DualArrayList< T, N >::left_at ( SInt si)
inlineconstexpr

Returns a reference to the element in the left list at the wrapped position with the given index.

Template Parameters
SIntAn unsigned integer/integral type
Parameters
sithe index of the element to retreive, negative indices will wrap to the end of the list
Returns
a reference to the element at position si or left_size() - si depending on signdines
Exceptions
Ifthe assertion level is at least O1 throws an assertion failure on out of bounds access

◆ left_back() [1/2]

template<class T, std::size_t N>
reference fiber::DualArrayList< T, N >::left_back ( )
inlineconstexpr

Returns a reference of the last element in the left list.

Exceptions
Ifthe assertion level is at least O1 throws an assertion failure if the list is empty

◆ left_back() [2/2]

template<class T, std::size_t N>
const_reference fiber::DualArrayList< T, N >::left_back ( ) const
inlineconstexpr

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

◆ left_begin() [1/2]

template<class T, std::size_t N>
left_iterator fiber::DualArrayList< T, N >::left_begin ( )
inlineconstexpr

returns an iterator to the beginning of the left list

◆ left_begin() [2/2]

template<class T, std::size_t N>
left_const_iterator fiber::DualArrayList< T, N >::left_begin ( ) const
inlineconstexpr

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

◆ left_capacity()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::left_capacity ( ) const
inlineconstexpr

Returns the capacity of the left list.

◆ left_cbegin()

template<class T, std::size_t N>
left_const_iterator fiber::DualArrayList< T, N >::left_cbegin ( ) const
inlineconstexpr

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

◆ left_cend()

template<class T, std::size_t N>
left_const_iterator fiber::DualArrayList< T, N >::left_cend ( ) const
inlineconstexpr

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

◆ left_clear()

template<class T, std::size_t N>
void fiber::DualArrayList< T, N >::left_clear ( )
inline

clears the left list

destructs all members if not trivially destructible and sets the size to zero

◆ left_csubrange()

template<class T, std::size_t N>
left_const_range fiber::DualArrayList< T, N >::left_csubrange ( ) const
inlineconstexpr

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

◆ left_emplace_back()

template<class T, std::size_t N>
template<class... Args>
reference fiber::DualArrayList< T, N >::left_emplace_back ( Args &&... args)
inline

emplaces (aka. pushes) an element to the back of the left list

Actually constructs an element in place

Template Parameters
...Argslist of parameters that correspond to a constructor of the value type of the list
Parameters
...argslist of arguments to construct a value of the list
Returns
a reference to the constructed list element

◆ left_empty()

template<class T, std::size_t N>
bool fiber::DualArrayList< T, N >::left_empty ( ) const
inlineconstexpr

Returns true if the left list is empty.

◆ left_end() [1/2]

template<class T, std::size_t N>
left_iterator fiber::DualArrayList< T, N >::left_end ( )
inlineconstexpr

returns an iterator past the end of the left list

◆ left_end() [2/2]

template<class T, std::size_t N>
left_const_iterator fiber::DualArrayList< T, N >::left_end ( ) const
inlineconstexpr

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

◆ left_erase() [1/4]

template<class T, std::size_t N>
template<std::integral Int>
left_iterator fiber::DualArrayList< T, N >::left_erase ( const Int pos)
inline

◆ left_erase() [2/4]

template<class T, std::size_t N>
template<class Int>
requires std::is_integral_v<Int>
left_iterator fiber::DualArrayList< T, N >::left_erase ( Int first,
Int last )
inline

◆ left_erase() [3/4]

template<class T, std::size_t N>
left_iterator fiber::DualArrayList< T, N >::left_erase ( left_const_iterator cpos)
inline

◆ left_erase() [4/4]

template<class T, std::size_t N>
left_iterator fiber::DualArrayList< T, N >::left_erase ( left_const_iterator first,
left_const_iterator last )
inline

◆ left_erase_if()

template<class T, std::size_t N>
template<class Callable>
std::size_t fiber::DualArrayList< T, N >::left_erase_if ( Callable && f)
inline

◆ left_for_each()

template<class T, std::size_t N>
template<class Function>
void fiber::DualArrayList< T, N >::left_for_each ( Function && function)
inlineconstexpr

◆ left_front() [1/2]

template<class T, std::size_t N>
reference fiber::DualArrayList< T, N >::left_front ( )
inlineconstexpr

Returns a reference of the first element in the left list.

Exceptions
Ifthe assertion level is at least O1 throws an assertion failure if the list is empty

◆ left_front() [2/2]

template<class T, std::size_t N>
const_reference fiber::DualArrayList< T, N >::left_front ( ) const
inlineconstexpr

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

◆ left_insert() [1/10]

template<class T, std::size_t N>
template<std::integral Int, std::ranges::forward_range Range>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const Int index,
const Range & range )
inline

◆ left_insert() [2/10]

template<class T, std::size_t N>
template<std::integral Int>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const Int index,
const T & value )
inline

Inserts a value into the left list at the index position.

If the integer type is signed, it will check wether or not the index is negative. If the integer is negative the value will wrap around the container

Note: positive values will insert at/before the value the index points to, while negative values will insert after if you view the range only in positive indices. So an insertion at -1 is equivalent to an insertion at the end() iterator

◆ left_insert() [3/10]

template<class T, std::size_t N>
template<std::integral Int, std::forward_iterator Itr>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const Int index,
Itr first,
Itr last )
inline

◆ left_insert() [4/10]

template<class T, std::size_t N>
template<std::integral Int, std::convertible_to< T > Ti>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const Int index,
std::initializer_list< Ti > ilist )
inline

◆ left_insert() [5/10]

template<class T, std::size_t N>
template<std::integral Int>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const Int index,
T && value )
inline

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

◆ left_insert() [6/10]

template<class T, std::size_t N>
template<std::ranges::forward_range Range>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const left_const_iterator pos,
const Range & range )
inline

◆ left_insert() [7/10]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const left_const_iterator pos,
const Ta & value )
inline

◆ left_insert() [8/10]

template<class T, std::size_t N>
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const left_const_iterator pos,
Itr first,
Itr last )
inline

◆ left_insert() [9/10]

template<class T, std::size_t N>
template<std::convertible_to< T > Ti>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const left_const_iterator pos,
std::initializer_list< Ti > ilist )
inline

◆ left_insert() [10/10]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
left_iterator fiber::DualArrayList< T, N >::left_insert ( const left_const_iterator pos,
Ta && value )
inline

◆ left_pop_back()

template<class T, std::size_t N>
void fiber::DualArrayList< T, N >::left_pop_back ( )
inline

◆ left_size()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::left_size ( ) const
inlineconstexpr

Returns the size of the left list.

◆ left_subrange() [1/2]

template<class T, std::size_t N>
left_range fiber::DualArrayList< T, N >::left_subrange ( )
inlineconstexpr

returns the left list as a subrange

◆ left_subrange() [2/2]

template<class T, std::size_t N>
left_const_range fiber::DualArrayList< T, N >::left_subrange ( ) const
inlineconstexpr

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

◆ left_to_const_iterator() [1/2]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
left_const_iterator fiber::DualArrayList< T, N >::left_to_const_iterator ( const SInt pos) const
inlineconstexpr

◆ left_to_const_iterator() [2/2]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
left_const_iterator fiber::DualArrayList< T, N >::left_to_const_iterator ( const UInt pos) const
inlineconstexpr

◆ left_to_index()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::left_to_index ( const left_const_iterator pos) const
inlineconstexpr

◆ left_to_iterator() [1/4]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
left_iterator fiber::DualArrayList< T, N >::left_to_iterator ( const SInt pos)
inlineconstexpr

◆ left_to_iterator() [2/4]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
left_const_iterator fiber::DualArrayList< T, N >::left_to_iterator ( const SInt pos) const
inlineconstexpr

◆ left_to_iterator() [3/4]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
left_iterator fiber::DualArrayList< T, N >::left_to_iterator ( const UInt pos)
inlineconstexpr

◆ left_to_iterator() [4/4]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
left_const_iterator fiber::DualArrayList< T, N >::left_to_iterator ( const UInt pos) const
inlineconstexpr

◆ left_unconst()

template<class T, std::size_t N>
left_iterator fiber::DualArrayList< T, N >::left_unconst ( const left_const_iterator pos)
inlineconstexpr

◆ max_size()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::max_size ( ) const
inlineconstexpr

Returns the maximal size - is the same for left and right.

◆ operator=()

template<class T, std::size_t N>
template<size_t N1>
DualArrayList & fiber::DualArrayList< T, N >::operator= ( const DualArrayList< T, N1 > & other)
inline

Copy assigns both lists like from the other dual list.

◆ reserve()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::reserve ( ) const
inlineconstexpr

Returns the size of the reserve (aka.) number of free elements that has not been claimed by either list.

◆ right_append() [1/4]

template<class T, std::size_t N>
template<std::ranges::forward_range Range>
void fiber::DualArrayList< T, N >::right_append ( const Range & range)
inline

◆ right_append() [2/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::right_append ( const size_type count,
const Ta & value )
inline

appends value count many times to the right list

Parameters
counthow often value should be right_emplaced_back()
valuethe value to be created

◆ right_append() [3/4]

template<class T, std::size_t N>
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void fiber::DualArrayList< T, N >::right_append ( Itr first,
Itr last )
inline

◆ right_append() [4/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::right_append ( std::initializer_list< Ta > ilist)
inline

◆ right_assign() [1/4]

template<class T, std::size_t N>
template<std::ranges::forward_range Range>
void fiber::DualArrayList< T, N >::right_assign ( const Range & range)
inline

◆ right_assign() [2/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::right_assign ( const size_type count,
const Ta & value )
inline

assigns a value count many times to the right list.

◆ right_assign() [3/4]

template<class T, std::size_t N>
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
void fiber::DualArrayList< T, N >::right_assign ( Itr first,
Itr last )
inline

◆ right_assign() [4/4]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
void fiber::DualArrayList< T, N >::right_assign ( std::initializer_list< Ta > ilist)
inline

◆ right_at() [1/6]

template<class T, std::size_t N>
ArrayList< T, N > fiber::DualArrayList< T, N >::right_at ( const ArrayList< bool, N > & mask) const
inline

Masked indexing of the right list.

Parameters
maskthe mask that selects which elements to get. true will be included, false excluded
Returns
A ArrayList that contains all values where of this where mask is true

◆ right_at() [2/6]

template<class T, std::size_t N>
template<class Int>
requires std::is_integral_v<Int>
ArrayList< T, N > fiber::DualArrayList< T, N >::right_at ( const ArrayList< Int, N > & indices) const
inline

constructs a list of from the right list at the provided list of indices

Template Parameters
Inta generic integer
Parameters
indicesa list of indices that should be extracted
Returns
a ArrayList containing all the elements from this that are contained in the indices

◆ right_at() [3/6]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
const_reference fiber::DualArrayList< T, N >::right_at ( const SInt si) const
inlineconstexpr

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

◆ right_at() [4/6]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
reference fiber::DualArrayList< T, N >::right_at ( const UInt i)
inlineconstexpr

Returns a reference to the element in the right list at the position with the given index.

Template Parameters
UIntAn unsigned integer/integral type
Parameters
ithe index of the element to retreive
Returns
a reference to the element at position i
Exceptions
Ifthe assertion level is at least O1 throws an assertion failure on out of bounds access

◆ right_at() [5/6]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
const_reference fiber::DualArrayList< T, N >::right_at ( const UInt i) const
inlineconstexpr

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

◆ right_at() [6/6]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
reference fiber::DualArrayList< T, N >::right_at ( SInt si)
inlineconstexpr

Returns a reference to the element in the right list at the wrapped position with the given index.

Template Parameters
SIntAn unsigned integer/integral type
Parameters
sithe index of the element to retreive, negative indices will wrap to the end of the list
Returns
a reference to the element at position si or right_size() - si depending on signdines
Exceptions
Ifthe assertion level is at least O1 throws an assertion failure on out of bounds access

◆ right_back() [1/2]

template<class T, std::size_t N>
reference fiber::DualArrayList< T, N >::right_back ( )
inlineconstexpr

Returns a reference of the last element in the right list.

Exceptions
Ifthe assertion level is at least O1 throws an assertion failure if the list is empty

◆ right_back() [2/2]

template<class T, std::size_t N>
const_reference fiber::DualArrayList< T, N >::right_back ( ) const
inlineconstexpr

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

◆ right_begin() [1/2]

template<class T, std::size_t N>
right_iterator fiber::DualArrayList< T, N >::right_begin ( )
inlineconstexpr

returns an iterator ot the beginning of the right list

◆ right_begin() [2/2]

template<class T, std::size_t N>
right_const_iterator fiber::DualArrayList< T, N >::right_begin ( ) const
inlineconstexpr

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

◆ right_capacity()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::right_capacity ( ) const
inlineconstexpr

Returns the capacity of the right list.

◆ right_cbegin()

template<class T, std::size_t N>
right_const_iterator fiber::DualArrayList< T, N >::right_cbegin ( ) const
inlineconstexpr

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

◆ right_cend()

template<class T, std::size_t N>
right_const_iterator fiber::DualArrayList< T, N >::right_cend ( ) const
inlineconstexpr

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

◆ right_clear()

template<class T, std::size_t N>
void fiber::DualArrayList< T, N >::right_clear ( )
inline

clears the right list

destructs all members if not trivially destructible and sets the size to zero

◆ right_csubrange()

template<class T, std::size_t N>
right_const_range fiber::DualArrayList< T, N >::right_csubrange ( ) const
inlineconstexpr

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

◆ right_emplace_back()

template<class T, std::size_t N>
template<class... Args>
reference fiber::DualArrayList< T, N >::right_emplace_back ( Args &&... args)
inline

emplaces (aka. pushes) an element to the back of the right list

Actually constructs an element in place

Template Parameters
...Argslist of parameters that correspond to a constructor of the value type of the list
Parameters
...argslist of arguments to construct a value of the list
Returns
a reference to the constructed list element

◆ right_empty()

template<class T, std::size_t N>
bool fiber::DualArrayList< T, N >::right_empty ( ) const
inlineconstexpr

returns true if the right list is empty

◆ right_end() [1/2]

template<class T, std::size_t N>
right_iterator fiber::DualArrayList< T, N >::right_end ( )
inlineconstexpr

returns an iterator past the end of the right list

◆ right_end() [2/2]

template<class T, std::size_t N>
right_const_iterator fiber::DualArrayList< T, N >::right_end ( ) const
inlineconstexpr

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

◆ right_erase() [1/4]

template<class T, std::size_t N>
template<std::integral Int>
right_iterator fiber::DualArrayList< T, N >::right_erase ( const Int pos)
inline

◆ right_erase() [2/4]

template<class T, std::size_t N>
template<class Int>
requires std::is_integral_v<Int>
right_iterator fiber::DualArrayList< T, N >::right_erase ( Int first,
Int last )
inline

◆ right_erase() [3/4]

template<class T, std::size_t N>
right_iterator fiber::DualArrayList< T, N >::right_erase ( right_const_iterator cpos)
inline

◆ right_erase() [4/4]

template<class T, std::size_t N>
right_iterator fiber::DualArrayList< T, N >::right_erase ( right_const_iterator first,
right_const_iterator last )
inline

◆ right_erase_if()

template<class T, std::size_t N>
template<class Callable>
std::size_t fiber::DualArrayList< T, N >::right_erase_if ( Callable && f)
inline

◆ right_for_each()

template<class T, std::size_t N>
template<class Function>
void fiber::DualArrayList< T, N >::right_for_each ( Function && function)
inlineconstexpr

◆ right_front() [1/2]

template<class T, std::size_t N>
reference fiber::DualArrayList< T, N >::right_front ( )
inlineconstexpr

Returns a reference of the first element in the right list.

Exceptions
Ifthe assertion level is at least O1 throws an assertion failure if the list is empty

◆ right_front() [2/2]

template<class T, std::size_t N>
const_reference fiber::DualArrayList< T, N >::right_front ( ) const
inlineconstexpr

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

◆ right_insert() [1/10]

template<class T, std::size_t N>
template<std::integral Int, std::ranges::forward_range Range>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const Int index,
const Range & range )
inline

◆ right_insert() [2/10]

template<class T, std::size_t N>
template<std::integral Int>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const Int index,
const T & value )
inline

Inserts a value into the right list at the index position.

If the integer type is signed, it will check wether or not the index is negative. If the integer is negative the value will wrap around the container

Note: positive values will insert at/before the value the index points to, while negative values will insert after if you view the range only in positive indices. So an insertion at -1 is equivalent to an insertion at the end() iterator

◆ right_insert() [3/10]

template<class T, std::size_t N>
template<std::integral Int, std::forward_iterator Itr>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const Int index,
Itr first,
Itr last )
inline

◆ right_insert() [4/10]

template<class T, std::size_t N>
template<std::integral Int>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const Int index,
T && value )
inline

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

◆ right_insert() [5/10]

template<class T, std::size_t N>
template<std::integral Int, std::convertible_to< T > Ti>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const right_const_iterator index,
std::initializer_list< Ti > ilist )
inline

◆ right_insert() [6/10]

template<class T, std::size_t N>
template<std::ranges::forward_range Range>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const right_const_iterator pos,
const Range & range )
inline

◆ right_insert() [7/10]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const right_const_iterator pos,
const Ta & value )
inline

◆ right_insert() [8/10]

template<class T, std::size_t N>
template<std::forward_iterator Itr>
requires std::convertible_to<typename std::iterator_traits<Itr>::value_type, T>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const right_const_iterator pos,
Itr first,
Itr last )
inline

◆ right_insert() [9/10]

template<class T, std::size_t N>
template<std::convertible_to< T > Ti>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const right_const_iterator pos,
std::initializer_list< Ti > ilist )
inline

◆ right_insert() [10/10]

template<class T, std::size_t N>
template<std::convertible_to< T > Ta>
right_iterator fiber::DualArrayList< T, N >::right_insert ( const right_const_iterator pos,
Ta && value )
inline

◆ right_pop_back()

template<class T, std::size_t N>
void fiber::DualArrayList< T, N >::right_pop_back ( )
inline

◆ right_size()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::right_size ( ) const
inlineconstexpr

Returns the size of the right list.

◆ right_subrange() [1/2]

template<class T, std::size_t N>
right_range fiber::DualArrayList< T, N >::right_subrange ( )
inlineconstexpr

returns the right list as a subrange

◆ right_subrange() [2/2]

template<class T, std::size_t N>
right_const_range fiber::DualArrayList< T, N >::right_subrange ( ) const
inlineconstexpr

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

◆ right_to_const_iterator() [1/2]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
right_const_iterator fiber::DualArrayList< T, N >::right_to_const_iterator ( const SInt pos) const
inlineconstexpr

◆ right_to_const_iterator() [2/2]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
right_const_iterator fiber::DualArrayList< T, N >::right_to_const_iterator ( const UInt pos) const
inlineconstexpr

◆ right_to_index()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::right_to_index ( const right_const_iterator pos) const
inlineconstexpr

◆ right_to_iterator() [1/4]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
right_iterator fiber::DualArrayList< T, N >::right_to_iterator ( const SInt pos)
inlineconstexpr

◆ right_to_iterator() [2/4]

template<class T, std::size_t N>
template<class SInt>
requires std::is_signed_v<SInt>
right_const_iterator fiber::DualArrayList< T, N >::right_to_iterator ( const SInt pos) const
inlineconstexpr

◆ right_to_iterator() [3/4]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
right_iterator fiber::DualArrayList< T, N >::right_to_iterator ( const UInt pos)
inlineconstexpr

◆ right_to_iterator() [4/4]

template<class T, std::size_t N>
template<class UInt>
requires std::is_unsigned_v<UInt>
right_const_iterator fiber::DualArrayList< T, N >::right_to_iterator ( const UInt pos) const
inlineconstexpr

◆ right_unconst()

template<class T, std::size_t N>
right_iterator fiber::DualArrayList< T, N >::right_unconst ( const right_const_iterator pos)
inlineconstexpr

◆ size()

template<class T, std::size_t N>
size_type fiber::DualArrayList< T, N >::size ( ) const
inlineconstexpr

Returns the combined size of both lists.


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