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

A reference to the right side of a DualArrayList. More...

#include <DualArrayList.hpp>

Public Types

using value_type = DualArrayList<T, N>::value_type
 
using size_type = DualArrayList<T, N>::size_type
 
using reference = DualArrayList<T, N>::reference
 
using const_reference = DualArrayList<T, N>::const_reference
 
using iterator = DualArrayList<T, N>::right_iterator
 
using const_iterator = DualArrayList<T, N>::right_const_iterator
 
using pointer = DualArrayList<T, N>::pointer
 
using const_pointer = DualArrayList<T, N>::const_pointer
 

Public Member Functions

 RightDualArrayListConstRef (const DualArrayList< T, N > &list)
 
constexpr size_type size () const
 returns the size/count of live elements in the container
 
constexpr size_type capacity () const
 returns the capacity of the container. Since this is a statically allocated container this is also the maximal size.
 
constexpr size_type max_size () const
 returns the maximal number of elements that can be stored in the container
 
constexpr size_type reserve () const
 returns the reserve - number of elements that can be stored until the container is full
 
constexpr bool empty () const
 returns true if there are not elements in the container, aka. the container is empty.
 
constexpr bool full () const
 returns true if the container is full and no more elements can be stored in the container
 
constexpr const_iterator begin () const
 returns a const-iterator to the start
 
constexpr const_iterator cbegin () const
 returns a const-iterator to the start
 
constexpr const_iterator end () const
 returns a const-iterator past the end
 
constexpr const_iterator cend () const
 returns a const-iterator past the end
 
constexpr const T & front () const
 returns a const-reference to the first element int the buffer
 
constexpr const T & back () const
 returns a const reference to the last element in the buffer
 
template<std::integral Int>
constexpr const T & at (const Int i) const
 returns a reference to the element at the given position
 
ArrayList< T, N > at (const ArrayList< bool, N > &mask) const
 Masked indexing.
 
template<std::integral Int>
ArrayList< T, N > at (const ArrayList< Int, N > &indices) const
 Inices list indexing.
 
template<std::integral Int>
constexpr const T & operator[] (const Int i) const
 returns a reference to the element at the given position
 
ArrayList< T, N > operator[] (const ArrayList< bool, N > &mask) const
 accesses all elements where mask is true
 
template<std::integral Int>
ArrayList< T, N > operator[] (const ArrayList< Int, N > &indices) const
 accesses all elements at the given indices
 
constexpr size_type to_index (const const_iterator pos) const
 turns the passed position given by an iterator into an integer
 
template<std::integral Int>
constexpr const_iterator to_iterator (const Int pos) const
 turns the passed unsigned integer into a cosnt_iterator pointing to the same position
 
template<std::integral Int>
constexpr const_iterator to_const_iterator (const Int pos) const
 turns the passed unsigned integer into a cosnt_iterator pointing to the same position
 
ArrayList< bool, N > operator! () const
 Applies the negation (!) operator to all elements and returns it as a bool list.
 

Detailed Description

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

A reference to the right side of a DualArrayList.

See also
DualArrayList

Member Typedef Documentation

◆ const_iterator

template<class T, std::size_t N>
using fiber::RightDualArrayListConstRef< T, N >::const_iterator = DualArrayList<T, N>::right_const_iterator

◆ const_pointer

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

◆ const_reference

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

◆ iterator

template<class T, std::size_t N>
using fiber::RightDualArrayListConstRef< T, N >::iterator = DualArrayList<T, N>::right_iterator

◆ pointer

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

◆ reference

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

◆ size_type

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

◆ value_type

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

Constructor & Destructor Documentation

◆ RightDualArrayListConstRef()

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

Member Function Documentation

◆ at() [1/3]

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

Masked indexing.

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

◆ at() [2/3]

template<class T, std::size_t N>
template<std::integral Int>
ArrayList< T, N > fiber::RightDualArrayListConstRef< T, N >::at ( const ArrayList< Int, N > & indices) const
inline

Inices list indexing.

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

◆ at() [3/3]

template<class T, std::size_t N>
template<std::integral Int>
const T & fiber::RightDualArrayListConstRef< T, N >::at ( const Int i) const
inlineconstexpr

returns a reference to the element at the given position

◆ back()

template<class T, std::size_t N>
const T & fiber::RightDualArrayListConstRef< T, N >::back ( ) const
inlineconstexpr

returns a const reference to the last element in the buffer

◆ begin()

template<class T, std::size_t N>
const_iterator fiber::RightDualArrayListConstRef< T, N >::begin ( ) const
inlineconstexpr

returns a const-iterator to the start

◆ capacity()

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

returns the capacity of the container. Since this is a statically allocated container this is also the maximal size.

◆ cbegin()

template<class T, std::size_t N>
const_iterator fiber::RightDualArrayListConstRef< T, N >::cbegin ( ) const
inlineconstexpr

returns a const-iterator to the start

◆ cend()

template<class T, std::size_t N>
const_iterator fiber::RightDualArrayListConstRef< T, N >::cend ( ) const
inlineconstexpr

returns a const-iterator past the end

◆ empty()

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

returns true if there are not elements in the container, aka. the container is empty.

◆ end()

template<class T, std::size_t N>
const_iterator fiber::RightDualArrayListConstRef< T, N >::end ( ) const
inlineconstexpr

returns a const-iterator past the end

◆ front()

template<class T, std::size_t N>
const T & fiber::RightDualArrayListConstRef< T, N >::front ( ) const
inlineconstexpr

returns a const-reference to the first element int the buffer

◆ full()

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

returns true if the container is full and no more elements can be stored in the container

◆ max_size()

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

returns the maximal number of elements that can be stored in the container

◆ operator!()

template<class T, std::size_t N>
ArrayList< bool, N > fiber::RightDualArrayListConstRef< T, N >::operator! ( ) const
inline

Applies the negation (!) operator to all elements and returns it as a bool list.

◆ operator[]() [1/3]

template<class T, std::size_t N>
ArrayList< T, N > fiber::RightDualArrayListConstRef< T, N >::operator[] ( const ArrayList< bool, N > & mask) const
inline

accesses all elements where mask is true

◆ operator[]() [2/3]

template<class T, std::size_t N>
template<std::integral Int>
ArrayList< T, N > fiber::RightDualArrayListConstRef< T, N >::operator[] ( const ArrayList< Int, N > & indices) const
inline

accesses all elements at the given indices

◆ operator[]() [3/3]

template<class T, std::size_t N>
template<std::integral Int>
const T & fiber::RightDualArrayListConstRef< T, N >::operator[] ( const Int i) const
inlineconstexpr

returns a reference to the element at the given position

◆ reserve()

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

returns the reserve - number of elements that can be stored until the container is full

◆ size()

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

returns the size/count of live elements in the container

◆ to_const_iterator()

template<class T, std::size_t N>
template<std::integral Int>
const_iterator fiber::RightDualArrayListConstRef< T, N >::to_const_iterator ( const Int pos) const
inlineconstexpr

turns the passed unsigned integer into a cosnt_iterator pointing to the same position

◆ to_index()

template<class T, std::size_t N>
size_type fiber::RightDualArrayListConstRef< T, N >::to_index ( const const_iterator pos) const
inlineconstexpr

turns the passed position given by an iterator into an integer

◆ to_iterator()

template<class T, std::size_t N>
template<std::integral Int>
const_iterator fiber::RightDualArrayListConstRef< T, N >::to_iterator ( const Int pos) const
inlineconstexpr

turns the passed unsigned integer into a cosnt_iterator pointing to the same position


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