xtensor
Loading...
Searching...
No Matches
xt::xoptional_assembly_base< D > Class Template Reference

Base class for dense multidimensional optional assemblies. More...

#include <xoptional_assembly_base.hpp>

Inheritance diagram for xt::xoptional_assembly_base< D >:
xt::xiterable< D >

Public Types

using self_type = xoptional_assembly_base<D>
 
using derived_type = D
 
using inner_types = xcontainer_inner_types<D>
 
using raw_value_expression = typename inner_types::raw_value_expression
 
using base_value_type = typename raw_value_expression::value_type
 
using base_reference = typename raw_value_expression::reference
 
using base_const_reference = typename raw_value_expression::const_reference
 
using raw_flag_expression = typename inner_types::raw_flag_expression
 
using flag_type = typename raw_flag_expression::value_type
 
using flag_reference = typename raw_flag_expression::reference
 
using flag_const_reference = typename raw_flag_expression::const_reference
 
using storage_type = typename inner_types::storage_type
 
using value_type = typename storage_type::value_type
 
using reference = typename storage_type::reference
 
using const_reference = typename storage_type::const_reference
 
using pointer = typename storage_type::pointer
 
using const_pointer = typename storage_type::const_pointer
 
using size_type = typename raw_value_expression::size_type
 
using difference_type = typename raw_value_expression::difference_type
 
using simd_value_type = xt_simd::simd_type<value_type>
 
using bool_load_type = xt::bool_load_type<value_type>
 
using shape_type = typename raw_value_expression::shape_type
 
using strides_type = typename raw_value_expression::strides_type
 
using backstrides_type = typename raw_value_expression::backstrides_type
 
using inner_shape_type = typename raw_value_expression::inner_shape_type
 
using inner_strides_type = typename raw_value_expression::inner_strides_type
 
using inner_backstrides_type = typename raw_value_expression::inner_backstrides_type
 
using iterable_base = xiterable<D>
 
using stepper = typename iterable_base::stepper
 
using const_stepper = typename iterable_base::const_stepper
 
using expression_tag = xoptional_expression_tag
 
using value_expression = raw_value_expression&
 
using flag_expression = raw_flag_expression&
 
using const_value_expression = const raw_value_expression&
 
using const_flag_expression = const raw_flag_expression&
 
template<layout_type L>
using layout_iterator = typename iterable_base::template layout_iterator<L>
 
template<layout_type L>
using const_layout_iterator = typename iterable_base::template const_layout_iterator<L>
 
template<layout_type L>
using reverse_layout_iterator = typename iterable_base::template reverse_layout_iterator<L>
 
template<layout_type L>
using const_reverse_layout_iterator = typename iterable_base::template const_reverse_layout_iterator<L>
 
template<class S , layout_type L>
using broadcast_iterator = typename iterable_base::template broadcast_iterator<S, L>
 
template<class S , layout_type L>
using const_broadcast_iterator = typename iterable_base::template const_broadcast_iterator<S, L>
 
template<class S , layout_type L>
using reverse_broadcast_iterator = typename iterable_base::template reverse_broadcast_iterator<S, L>
 
template<class S , layout_type L>
using const_reverse_broadcast_iterator = typename iterable_base::template const_reverse_broadcast_iterator<S, L>
 
using linear_iterator = typename storage_type::iterator
 
using const_linear_iterator = typename storage_type::const_iterator
 
using reverse_linear_iterator = typename storage_type::reverse_iterator
 
using const_reverse_linear_iterator = typename storage_type::const_reverse_iterator
 
using iterator = typename iterable_base::iterator
 
using const_iterator = typename iterable_base::const_iterator
 
using reverse_iterator = typename iterable_base::reverse_iterator
 
using const_reverse_iterator = typename iterable_base::const_reverse_iterator
 

Public Member Functions

template<class... Args>
reference operator() (Args... args)
 
template<class... Args>
const_reference operator() (Args... args) const
 
template<class... Args>
reference at (Args... args)
 
template<class... Args>
const_reference at (Args... args) const
 
template<class... Args>
reference unchecked (Args... args)
 
template<class... Args>
const_reference unchecked (Args... args) const
 
template<class S >
disable_integral_t< S, reference > operator[] (const S &index)
 
template<class I >
reference operator[] (std::initializer_list< I > index)
 
template<class S >
disable_integral_t< S, const_reference > operator[] (const S &index) const
 
template<class I >
const_reference operator[] (std::initializer_list< I > index) const
 
template<class... Args>
reference periodic (Args... args)
 
template<class... Args>
const_reference periodic (Args... args) const
 
template<class It >
reference element (It first, It last)
 
template<class It >
const_reference element (It first, It last) const
 
template<class S >
stepper stepper_begin (const S &shape) noexcept
 
template<class S >
stepper stepper_end (const S &shape, layout_type l) noexcept
 
template<class S >
const_stepper stepper_begin (const S &shape) const noexcept
 
template<class S >
const_stepper stepper_end (const S &shape, layout_type l) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
layout_iterator< Lbegin () noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
broadcast_iterator< S, Lbegin (const S &shape) noexcept
 
template<layout_type L>
auto begin () noexcept -> layout_iterator< L >
 Returns an iterator to the first element of the expression.
 
template<layout_type L, class S >
auto begin (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the first element of the expression.
 
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< Lbegin () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_broadcast_iterator< S, Lbegin (const S &shape) const noexcept
 
template<layout_type L>
auto begin () const noexcept -> const_layout_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
template<layout_type L, class S >
auto begin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
template<layout_type L = ::xt::layout_type::row_major>
layout_iterator< Lend () noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
broadcast_iterator< S, Lend (const S &shape) noexcept
 
template<layout_type L>
auto end () noexcept -> layout_iterator< L >
 Returns an iterator to the element following the last element of the expression.
 
template<layout_type L, class S >
auto end (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the element following the last element of the expression.
 
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< Lend () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_broadcast_iterator< S, Lend (const S &shape) const noexcept
 
template<layout_type L>
auto end () const noexcept -> const_layout_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
template<layout_type L, class S >
auto end (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the element following the last element of the expression.
 
template<layout_type L = ::xt::layout_type::row_major>
reverse_layout_iterator< Lrbegin () noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
reverse_broadcast_iterator< S, Lrbegin (const S &shape) noexcept
 
template<layout_type L>
auto rbegin () noexcept -> reverse_layout_iterator< L >
 Returns an iterator to the first element of the reversed expression.
 
template<layout_type L, class S >
auto rbegin (const S &shape) noexcept -> reverse_broadcast_iterator< S, L >
 Returns an iterator to the first element of the reversed expression.
 
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< Lrbegin () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_reverse_broadcast_iterator< S, Lrbegin (const S &shape) const noexcept
 
template<layout_type L>
auto rbegin () const noexcept -> const_reverse_layout_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
template<layout_type L, class S >
auto rbegin (const S &shape) const noexcept -> const_reverse_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the reversed expression.
 
template<layout_type L = ::xt::layout_type::row_major>
reverse_layout_iterator< Lrend () noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
reverse_broadcast_iterator< S, Lrend (const S &shape) noexcept
 
template<layout_type L>
auto rend () noexcept -> reverse_layout_iterator< L >
 Returns an iterator to the element following the last element of the reversed expression.
 
template<layout_type L, class S >
auto rend (const S &shape) noexcept -> reverse_broadcast_iterator< S, L >
 Returns an iterator to the element following the last element of the reversed expression.
 
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< Lrend () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_reverse_broadcast_iterator< S, Lrend (const S &shape) const noexcept
 
template<layout_type L>
auto rend () const noexcept -> const_reverse_layout_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
template<layout_type L, class S >
auto rend (const S &shape) const noexcept -> const_reverse_broadcast_iterator< S, L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
Size and shape
size_type size () const noexcept
 Returns the number of element in the optional assembly.
 
constexpr size_type dimension () const noexcept
 Returns the number of dimensions of the optional assembly.
 
const inner_shape_type & shape () const noexcept
 Returns the shape of the optional assembly.
 
size_type shape (size_type index) const
 Returns the i-th dimension of the expression.
 
const inner_strides_type & strides () const noexcept
 Returns the strides of the optional assembly.
 
const inner_backstrides_type & backstrides () const noexcept
 Returns the backstrides of the optional assembly.
 
template<class S = shape_type>
void resize (const S &shape, bool force=false)
 Resizes the optional assembly.
 
template<class S = shape_type>
void resize (const S &shape, layout_type l)
 Resizes the optional assembly.
 
template<class S = shape_type>
void resize (const S &shape, const strides_type &strides)
 Resizes the optional assembly.
 
template<class S = shape_type>
autoreshape (const S &shape, layout_type layout=static_layout) &
 Reshapes the optional assembly.
 
template<class T >
autoreshape (std::initializer_list< T > shape, layout_type layout=static_layout) &
 
layout_type layout () const noexcept
 Return the layout_type of the container.
 
bool is_contiguous () const noexcept
 
template<class T >
void fill (const T &value)
 Fills the data with the given value.
 
Data
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
reference front ()
 Returns a reference to the first element of the optional assembly.
 
const_reference front () const
 Returns a constant reference to the first element of the optional assembly.
 
reference back ()
 Returns a reference to the last element of the optional assembly.
 
const_reference back () const
 Returns a constant reference to the last element of the optional assembly.
 
reference flat (size_type args)
 Returns a reference to the element at the specified position of the underlying storage in the optional assembly.
 
const_reference flat (size_type args) const
 Returns a constant reference to the element at the specified position of the underlying storage in the optional assembly.
 
template<class... Args>
bool in_bounds (Args... args) const
 Returns true only if the the specified position is a valid entry in the expression.
 
storage_type & storage () noexcept
 
const storage_type & storage () const noexcept
 
value_type * data () noexcept
 
const value_type * data () const noexcept
 
const size_type data_offset () const noexcept
 
template<class... Args>
auto operator() (Args... args) -> reference
 Returns a reference to the element at the specified position in the optional assembly.
 
template<class... Args>
auto operator() (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the optional assembly.
 
template<class... Args>
auto at (Args... args) -> reference
 Returns a reference to the element at the specified position in the optional assembly, after dimension and bounds checking.
 
template<class... Args>
auto at (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the optional assembly, after dimension and bounds checking.
 
template<class... Args>
auto unchecked (Args... args) -> reference
 Returns a reference to the element at the specified position in the optional assembly.
 
template<class... Args>
auto unchecked (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the optional assembly.
 
template<class S >
auto operator[] (const S &index) -> disable_integral_t< S, reference >
 Returns a reference to the element at the specified position in the optional assembly.
 
template<class I >
auto operator[] (std::initializer_list< I > index) -> reference
 
template<class S >
auto operator[] (const S &index) const -> disable_integral_t< S, const_reference >
 Returns a constant reference to the element at the specified position in the optional assembly.
 
template<class I >
auto operator[] (std::initializer_list< I > index) const -> const_reference
 
template<class... Args>
auto periodic (Args... args) -> reference
 Returns a reference to the element at the specified position in the optional assembly, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
 
template<class... Args>
auto periodic (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the optional assembly, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
 
template<class It >
auto element (It first, It last) -> reference
 Returns a reference to the element at the specified position in the optional assembly.
 
template<class It >
auto element (It first, It last) const -> const_reference
 Returns a constant reference to the element at the specified position in the optional assembly.
 

Static Public Attributes

static constexpr layout_type static_layout = raw_value_expression::static_layout
 
static constexpr bool contiguous_layout = raw_value_expression::contiguous_layout
 

Protected Member Functions

 xoptional_assembly_base (const xoptional_assembly_base &)=default
 
xoptional_assembly_baseoperator= (const xoptional_assembly_base &)=default
 
 xoptional_assembly_base (xoptional_assembly_base &&)=default
 
xoptional_assembly_baseoperator= (xoptional_assembly_base &&)=default
 

Friends

class xiterable< D >
 
class xconst_iterable< D >
 

Broadcasting

template<class S >
bool broadcast_shape (S &shape, bool reuse_cache=false) const
 Broadcast the shape of the optional assembly to the specified parameter.
 
template<class S >
bool has_linear_assign (const S &strides) const noexcept
 Checks whether the xoptional_assembly_base can be linearly assigned to an expression with the specified strides.
 
linear_iterator linear_begin () noexcept
 
linear_iterator linear_end () noexcept
 
const_linear_iterator linear_begin () const noexcept
 
const_linear_iterator linear_end () const noexcept
 
const_linear_iterator linear_cbegin () const noexcept
 
const_linear_iterator linear_cend () const noexcept
 
reverse_linear_iterator linear_rbegin () noexcept
 
reverse_linear_iterator linear_rend () noexcept
 
const_reverse_linear_iterator linear_rbegin () const noexcept
 
const_reverse_linear_iterator linear_rend () const noexcept
 
const_reverse_linear_iterator linear_crbegin () const noexcept
 
const_reverse_linear_iterator linear_crend () const noexcept
 
value_expression value () noexcept
 Return an expression for the values of the optional assembly.
 
const_value_expression value () const noexcept
 Return a constant expression for the values of the optional assembly.
 
flag_expression has_value () noexcept
 Return an expression for the missing mask of the optional assembly.
 
const_flag_expression has_value () const noexcept
 Return a constant expression for the missing mask of the optional assembly.
 
template<class S >
auto stepper_begin (const S &shape) noexcept -> stepper
 
template<class S >
auto stepper_end (const S &shape, layout_type l) noexcept -> stepper
 
template<class S >
auto stepper_begin (const S &shape) const noexcept -> const_stepper
 
template<class S >
auto stepper_end (const S &shape, layout_type l) const noexcept -> const_stepper
 

Detailed Description

template<class D>
class xt::xoptional_assembly_base< D >

Base class for dense multidimensional optional assemblies.

The xoptional_assembly_base class defines the interface for dense multidimensional optional assembly classes. Optional assembly classes hold optional values and are optimized for tensor operations. xoptional_assembly_base does not embed any data container, this responsibility is delegated to the inheriting classes.

Template Parameters
DThe derived type, i.e. the inheriting class for which xoptional_assembly_base provides the interface.

Definition at line 39 of file xoptional_assembly_base.hpp.

Member Typedef Documentation

◆ backstrides_type

template<class D >
using xt::xoptional_assembly_base< D >::backstrides_type = typename raw_value_expression::backstrides_type

Definition at line 71 of file xoptional_assembly_base.hpp.

◆ base_const_reference

template<class D >
using xt::xoptional_assembly_base< D >::base_const_reference = typename raw_value_expression::const_reference

Definition at line 50 of file xoptional_assembly_base.hpp.

◆ base_reference

template<class D >
using xt::xoptional_assembly_base< D >::base_reference = typename raw_value_expression::reference

Definition at line 49 of file xoptional_assembly_base.hpp.

◆ base_value_type

template<class D >
using xt::xoptional_assembly_base< D >::base_value_type = typename raw_value_expression::value_type

Definition at line 48 of file xoptional_assembly_base.hpp.

◆ bool_load_type

template<class D >
using xt::xoptional_assembly_base< D >::bool_load_type = xt::bool_load_type<value_type>

Definition at line 67 of file xoptional_assembly_base.hpp.

◆ broadcast_iterator

template<class D >
template<class S , layout_type L>
using xt::xoptional_assembly_base< D >::broadcast_iterator = typename iterable_base::template broadcast_iterator<S, L>

Definition at line 100 of file xoptional_assembly_base.hpp.

◆ const_broadcast_iterator

template<class D >
template<class S , layout_type L>
using xt::xoptional_assembly_base< D >::const_broadcast_iterator = typename iterable_base::template const_broadcast_iterator<S, L>

Definition at line 102 of file xoptional_assembly_base.hpp.

◆ const_flag_expression

template<class D >
using xt::xoptional_assembly_base< D >::const_flag_expression = const raw_flag_expression&

Definition at line 88 of file xoptional_assembly_base.hpp.

◆ const_iterator

template<class D >
using xt::xoptional_assembly_base< D >::const_iterator = typename iterable_base::const_iterator

Definition at line 114 of file xoptional_assembly_base.hpp.

◆ const_layout_iterator

template<class D >
template<layout_type L>
using xt::xoptional_assembly_base< D >::const_layout_iterator = typename iterable_base::template const_layout_iterator<L>

Definition at line 93 of file xoptional_assembly_base.hpp.

◆ const_linear_iterator

template<class D >
using xt::xoptional_assembly_base< D >::const_linear_iterator = typename storage_type::const_iterator

Definition at line 109 of file xoptional_assembly_base.hpp.

◆ const_pointer

template<class D >
using xt::xoptional_assembly_base< D >::const_pointer = typename storage_type::const_pointer

Definition at line 63 of file xoptional_assembly_base.hpp.

◆ const_reference

template<class D >
using xt::xoptional_assembly_base< D >::const_reference = typename storage_type::const_reference

Definition at line 61 of file xoptional_assembly_base.hpp.

◆ const_reverse_broadcast_iterator

template<class D >
template<class S , layout_type L>
using xt::xoptional_assembly_base< D >::const_reverse_broadcast_iterator = typename iterable_base::template const_reverse_broadcast_iterator<S, L>

Definition at line 106 of file xoptional_assembly_base.hpp.

◆ const_reverse_iterator

template<class D >
using xt::xoptional_assembly_base< D >::const_reverse_iterator = typename iterable_base::const_reverse_iterator

Definition at line 116 of file xoptional_assembly_base.hpp.

◆ const_reverse_layout_iterator

template<class D >
template<layout_type L>
using xt::xoptional_assembly_base< D >::const_reverse_layout_iterator = typename iterable_base::template const_reverse_layout_iterator<L>

Definition at line 97 of file xoptional_assembly_base.hpp.

◆ const_reverse_linear_iterator

template<class D >
using xt::xoptional_assembly_base< D >::const_reverse_linear_iterator = typename storage_type::const_reverse_iterator

Definition at line 111 of file xoptional_assembly_base.hpp.

◆ const_stepper

template<class D >
using xt::xoptional_assembly_base< D >::const_stepper = typename iterable_base::const_stepper

Definition at line 79 of file xoptional_assembly_base.hpp.

◆ const_value_expression

template<class D >
using xt::xoptional_assembly_base< D >::const_value_expression = const raw_value_expression&

Definition at line 87 of file xoptional_assembly_base.hpp.

◆ derived_type

template<class D >
using xt::xoptional_assembly_base< D >::derived_type = D

Definition at line 44 of file xoptional_assembly_base.hpp.

◆ difference_type

template<class D >
using xt::xoptional_assembly_base< D >::difference_type = typename raw_value_expression::difference_type

Definition at line 65 of file xoptional_assembly_base.hpp.

◆ expression_tag

Definition at line 84 of file xoptional_assembly_base.hpp.

◆ flag_const_reference

template<class D >
using xt::xoptional_assembly_base< D >::flag_const_reference = typename raw_flag_expression::const_reference

Definition at line 55 of file xoptional_assembly_base.hpp.

◆ flag_expression

template<class D >
using xt::xoptional_assembly_base< D >::flag_expression = raw_flag_expression&

Definition at line 86 of file xoptional_assembly_base.hpp.

◆ flag_reference

template<class D >
using xt::xoptional_assembly_base< D >::flag_reference = typename raw_flag_expression::reference

Definition at line 54 of file xoptional_assembly_base.hpp.

◆ flag_type

template<class D >
using xt::xoptional_assembly_base< D >::flag_type = typename raw_flag_expression::value_type

Definition at line 53 of file xoptional_assembly_base.hpp.

◆ inner_backstrides_type

template<class D >
using xt::xoptional_assembly_base< D >::inner_backstrides_type = typename raw_value_expression::inner_backstrides_type

Definition at line 75 of file xoptional_assembly_base.hpp.

◆ inner_shape_type

template<class D >
using xt::xoptional_assembly_base< D >::inner_shape_type = typename raw_value_expression::inner_shape_type

Definition at line 73 of file xoptional_assembly_base.hpp.

◆ inner_strides_type

template<class D >
using xt::xoptional_assembly_base< D >::inner_strides_type = typename raw_value_expression::inner_strides_type

Definition at line 74 of file xoptional_assembly_base.hpp.

◆ inner_types

Definition at line 45 of file xoptional_assembly_base.hpp.

◆ iterable_base

template<class D >
using xt::xoptional_assembly_base< D >::iterable_base = xiterable<D>

Definition at line 77 of file xoptional_assembly_base.hpp.

◆ iterator

template<class D >
using xt::xoptional_assembly_base< D >::iterator = typename iterable_base::iterator

Definition at line 113 of file xoptional_assembly_base.hpp.

◆ layout_iterator

template<class D >
template<layout_type L>
using xt::xoptional_assembly_base< D >::layout_iterator = typename iterable_base::template layout_iterator<L>

Definition at line 91 of file xoptional_assembly_base.hpp.

◆ linear_iterator

template<class D >
using xt::xoptional_assembly_base< D >::linear_iterator = typename storage_type::iterator

Definition at line 108 of file xoptional_assembly_base.hpp.

◆ pointer

template<class D >
using xt::xoptional_assembly_base< D >::pointer = typename storage_type::pointer

Definition at line 62 of file xoptional_assembly_base.hpp.

◆ raw_flag_expression

template<class D >
using xt::xoptional_assembly_base< D >::raw_flag_expression = typename inner_types::raw_flag_expression

Definition at line 52 of file xoptional_assembly_base.hpp.

◆ raw_value_expression

template<class D >
using xt::xoptional_assembly_base< D >::raw_value_expression = typename inner_types::raw_value_expression

Definition at line 47 of file xoptional_assembly_base.hpp.

◆ reference

template<class D >
using xt::xoptional_assembly_base< D >::reference = typename storage_type::reference

Definition at line 60 of file xoptional_assembly_base.hpp.

◆ reverse_broadcast_iterator

template<class D >
template<class S , layout_type L>
using xt::xoptional_assembly_base< D >::reverse_broadcast_iterator = typename iterable_base::template reverse_broadcast_iterator<S, L>

Definition at line 104 of file xoptional_assembly_base.hpp.

◆ reverse_iterator

template<class D >
using xt::xoptional_assembly_base< D >::reverse_iterator = typename iterable_base::reverse_iterator

Definition at line 115 of file xoptional_assembly_base.hpp.

◆ reverse_layout_iterator

template<class D >
template<layout_type L>
using xt::xoptional_assembly_base< D >::reverse_layout_iterator = typename iterable_base::template reverse_layout_iterator<L>

Definition at line 95 of file xoptional_assembly_base.hpp.

◆ reverse_linear_iterator

template<class D >
using xt::xoptional_assembly_base< D >::reverse_linear_iterator = typename storage_type::reverse_iterator

Definition at line 110 of file xoptional_assembly_base.hpp.

◆ self_type

Definition at line 43 of file xoptional_assembly_base.hpp.

◆ shape_type

template<class D >
using xt::xoptional_assembly_base< D >::shape_type = typename raw_value_expression::shape_type

Definition at line 69 of file xoptional_assembly_base.hpp.

◆ simd_value_type

template<class D >
using xt::xoptional_assembly_base< D >::simd_value_type = xt_simd::simd_type<value_type>

Definition at line 66 of file xoptional_assembly_base.hpp.

◆ size_type

template<class D >
using xt::xoptional_assembly_base< D >::size_type = typename raw_value_expression::size_type

Definition at line 64 of file xoptional_assembly_base.hpp.

◆ stepper

template<class D >
using xt::xoptional_assembly_base< D >::stepper = typename iterable_base::stepper

Definition at line 78 of file xoptional_assembly_base.hpp.

◆ storage_type

template<class D >
using xt::xoptional_assembly_base< D >::storage_type = typename inner_types::storage_type

Definition at line 57 of file xoptional_assembly_base.hpp.

◆ strides_type

template<class D >
using xt::xoptional_assembly_base< D >::strides_type = typename raw_value_expression::strides_type

Definition at line 70 of file xoptional_assembly_base.hpp.

◆ value_expression

template<class D >
using xt::xoptional_assembly_base< D >::value_expression = raw_value_expression&

Definition at line 85 of file xoptional_assembly_base.hpp.

◆ value_type

template<class D >
using xt::xoptional_assembly_base< D >::value_type = typename storage_type::value_type

Definition at line 59 of file xoptional_assembly_base.hpp.

Member Function Documentation

◆ at() [1/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::at ( Args... args) -> reference
inline

Returns a reference to the element at the specified position in the optional assembly, after dimension and bounds checking.

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the optional assembly.
Exceptions
std::out_of_rangeif the number of argument is greater than the number of dimensions or if indices are out of bounds.

Definition at line 510 of file xoptional_assembly_base.hpp.

◆ at() [2/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::at ( Args... args) const -> const_reference
inline

Returns a constant reference to the element at the specified position in the optional assembly, after dimension and bounds checking.

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the optional assembly.
Exceptions
std::out_of_rangeif the number of argument is greater than the number of dimensions or if indices are out of bounds.

Definition at line 526 of file xoptional_assembly_base.hpp.

◆ back() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::back ( )
inline

Returns a reference to the last element of the optional assembly.

Definition at line 686 of file xoptional_assembly_base.hpp.

◆ back() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::back ( ) const
inline

Returns a constant reference to the last element of the optional assembly.

Definition at line 695 of file xoptional_assembly_base.hpp.

◆ backstrides()

template<class D >
auto xt::xoptional_assembly_base< D >::backstrides ( ) const
inlinenoexcept

Returns the backstrides of the optional assembly.

Definition at line 373 of file xoptional_assembly_base.hpp.

◆ begin() [1/4]

template<class D >
template<layout_type L>
auto xt::xconst_iterable< D >::begin ( ) const -> const_layout_iterator<L>
inlinenoexcept

Returns a constant iterator to the first element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 189 of file xiterable.hpp.

◆ begin() [2/4]

template<class D >
template<layout_type L>
auto xt::xiterable< D >::begin ( ) -> layout_iterator<L>
inlinenoexcept

Returns an iterator to the first element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 757 of file xiterable.hpp.

◆ begin() [3/4]

template<class D >
template<layout_type L, class S >
auto xt::xconst_iterable< D >::begin ( const S & shape) const -> const_broadcast_iterator<S, L>
inlinenoexcept

Returns a constant iterator to the first element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 189 of file xiterable.hpp.

◆ begin() [4/4]

template<class D >
template<layout_type L, class S >
auto xt::xiterable< D >::begin ( const S & shape) -> broadcast_iterator<S, L>
inlinenoexcept

Returns an iterator to the first element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 818 of file xiterable.hpp.

◆ broadcast_shape()

template<class D >
template<class S >
bool xt::xoptional_assembly_base< D >::broadcast_shape ( S & shape,
bool reuse_cache = false ) const
inline

Broadcast the shape of the optional assembly to the specified parameter.

Parameters
shapethe result shape
reuse_cacheparameter for internal optimization
Returns
a boolean indicating whether the broadcasting is trivial

Definition at line 806 of file xoptional_assembly_base.hpp.

◆ data() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::data ( ) const
inlinenoexcept

Definition at line 783 of file xoptional_assembly_base.hpp.

◆ data() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::data ( )
inlinenoexcept

Definition at line 777 of file xoptional_assembly_base.hpp.

◆ data_offset()

template<class D >
auto xt::xoptional_assembly_base< D >::data_offset ( ) const
inlinenoexcept

Definition at line 789 of file xoptional_assembly_base.hpp.

◆ dimension()

template<class D >
constexpr auto xt::xoptional_assembly_base< D >::dimension ( ) const
inlineconstexprnoexcept

Returns the number of dimensions of the optional assembly.

Definition at line 337 of file xoptional_assembly_base.hpp.

◆ element() [1/2]

template<class D >
template<class It >
auto xt::xoptional_assembly_base< D >::element ( It first,
It last ) -> reference
inline

Returns a reference to the element at the specified position in the optional assembly.

Parameters
firstiterator starting the sequence of indices
lastiterator ending the sequence of indices The number of indices in the sequence should be equal to or greater than the number of dimensions of the optional assembly.

Definition at line 731 of file xoptional_assembly_base.hpp.

◆ element() [2/2]

template<class D >
template<class It >
auto xt::xoptional_assembly_base< D >::element ( It first,
It last ) const -> const_reference
inline

Returns a constant reference to the element at the specified position in the optional assembly.

Parameters
firstiterator starting the sequence of indices
lastiterator ending the sequence of indices The number of indices in the sequence should be equal to or greater than the number of dimensions of the optional assembly.

Definition at line 745 of file xoptional_assembly_base.hpp.

◆ end() [1/4]

template<class D >
template<layout_type L>
auto xt::xconst_iterable< D >::end ( ) const -> const_layout_iterator<L>
inlinenoexcept

Returns a constant iterator to the element following the last element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 190 of file xiterable.hpp.

◆ end() [2/4]

template<class D >
template<layout_type L>
auto xt::xiterable< D >::end ( ) -> layout_iterator<L>
inlinenoexcept

Returns an iterator to the element following the last element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 769 of file xiterable.hpp.

◆ end() [3/4]

template<class D >
template<layout_type L, class S >
auto xt::xconst_iterable< D >::end ( const S & shape) const -> const_broadcast_iterator<S, L>
inlinenoexcept

Returns a constant iterator to the element following the last element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 190 of file xiterable.hpp.

◆ end() [4/4]

template<class D >
template<layout_type L, class S >
auto xt::xiterable< D >::end ( const S & shape) -> broadcast_iterator<S, L>
inlinenoexcept

Returns an iterator to the element following the last element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 832 of file xiterable.hpp.

◆ fill()

template<class D >
template<class T >
void xt::xoptional_assembly_base< D >::fill ( const T & value)
inline

Fills the data with the given value.

Parameters
valuethe value to fill the data with.

Definition at line 464 of file xoptional_assembly_base.hpp.

◆ flat() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::flat ( size_type i)
inline

Returns a reference to the element at the specified position of the underlying storage in the optional assembly.

Parameters
indexindex to underlying flat storage.

Definition at line 706 of file xoptional_assembly_base.hpp.

◆ flat() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::flat ( size_type i) const
inline

Returns a constant reference to the element at the specified position of the underlying storage in the optional assembly.

Parameters
indexindex to underlying flat storage.

Definition at line 717 of file xoptional_assembly_base.hpp.

◆ front() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::front ( )
inline

Returns a reference to the first element of the optional assembly.

Definition at line 668 of file xoptional_assembly_base.hpp.

◆ front() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::front ( ) const
inline

Returns a constant reference to the first element of the optional assembly.

Definition at line 677 of file xoptional_assembly_base.hpp.

◆ has_linear_assign()

template<class D >
template<class S >
bool xt::xoptional_assembly_base< D >::has_linear_assign ( const S & strides) const
inlinenoexcept

Checks whether the xoptional_assembly_base can be linearly assigned to an expression with the specified strides.

Returns
a boolean indicating whether a linear assign is possible

Definition at line 819 of file xoptional_assembly_base.hpp.

◆ has_value() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::has_value ( ) const
inlinenoexcept

Return a constant expression for the missing mask of the optional assembly.

Definition at line 958 of file xoptional_assembly_base.hpp.

◆ has_value() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::has_value ( )
inlinenoexcept

Return an expression for the missing mask of the optional assembly.

Definition at line 949 of file xoptional_assembly_base.hpp.

◆ in_bounds()

template<class D >
template<class... Args>
bool xt::xoptional_assembly_base< D >::in_bounds ( Args... args) const
inline

Returns true only if the the specified position is a valid entry in the expression.

Parameters
argsa list of indices specifying the position in the expression.
Returns
bool

Definition at line 757 of file xoptional_assembly_base.hpp.

◆ is_contiguous()

template<class D >
bool xt::xoptional_assembly_base< D >::is_contiguous ( ) const
inlinenoexcept

Definition at line 453 of file xoptional_assembly_base.hpp.

◆ layout()

template<class D >
layout_type xt::xoptional_assembly_base< D >::layout ( ) const
inlinenoexcept

Return the layout_type of the container.

Returns
layout_type of the container

Definition at line 447 of file xoptional_assembly_base.hpp.

◆ linear_begin() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_begin ( ) const
inlinenoexcept

Definition at line 839 of file xoptional_assembly_base.hpp.

◆ linear_begin() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_begin ( )
inlinenoexcept

Definition at line 827 of file xoptional_assembly_base.hpp.

◆ linear_cbegin()

template<class D >
auto xt::xoptional_assembly_base< D >::linear_cbegin ( ) const
inlinenoexcept

Definition at line 851 of file xoptional_assembly_base.hpp.

◆ linear_cend()

template<class D >
auto xt::xoptional_assembly_base< D >::linear_cend ( ) const
inlinenoexcept

Definition at line 857 of file xoptional_assembly_base.hpp.

◆ linear_crbegin()

template<class D >
auto xt::xoptional_assembly_base< D >::linear_crbegin ( ) const
inlinenoexcept

Definition at line 887 of file xoptional_assembly_base.hpp.

◆ linear_crend()

template<class D >
auto xt::xoptional_assembly_base< D >::linear_crend ( ) const
inlinenoexcept

Definition at line 893 of file xoptional_assembly_base.hpp.

◆ linear_end() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_end ( ) const
inlinenoexcept

Definition at line 845 of file xoptional_assembly_base.hpp.

◆ linear_end() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_end ( )
inlinenoexcept

Definition at line 833 of file xoptional_assembly_base.hpp.

◆ linear_rbegin() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_rbegin ( ) const
inlinenoexcept

Definition at line 875 of file xoptional_assembly_base.hpp.

◆ linear_rbegin() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_rbegin ( )
inlinenoexcept

Definition at line 863 of file xoptional_assembly_base.hpp.

◆ linear_rend() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_rend ( ) const
inlinenoexcept

Definition at line 881 of file xoptional_assembly_base.hpp.

◆ linear_rend() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::linear_rend ( )
inlinenoexcept

Definition at line 869 of file xoptional_assembly_base.hpp.

◆ operator()() [1/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::operator() ( Args... args) -> reference
inline

Returns a reference to the element at the specified position in the optional assembly.

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices should be equal or greater than the number of dimensions of the optional assembly.

Definition at line 481 of file xoptional_assembly_base.hpp.

◆ operator()() [2/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::operator() ( Args... args) const -> const_reference
inline

Returns a constant reference to the element at the specified position in the optional assembly.

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices should be equal or greater than the number of dimensions of the optional assembly.

Definition at line 494 of file xoptional_assembly_base.hpp.

◆ operator[]() [1/6]

template<class D >
template<class S >
auto xt::xoptional_assembly_base< D >::operator[] ( const S & index) -> disable_integral_t<S, reference>
inline

Returns a reference to the element at the specified position in the optional assembly.

Parameters
indexa sequence of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices in the list should be equal or greater than the number of dimensions of the optional assembly.

Definition at line 591 of file xoptional_assembly_base.hpp.

◆ operator[]() [2/6]

template<class D >
template<class S >
auto xt::xoptional_assembly_base< D >::operator[] ( const S & index) const -> disable_integral_t<S, const_reference>
inline

Returns a constant reference to the element at the specified position in the optional assembly.

Parameters
indexa sequence of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices in the list should be equal or greater than the number of dimensions of the optional assembly.

Definition at line 617 of file xoptional_assembly_base.hpp.

◆ operator[]() [3/6]

template<class D >
auto xt::xoptional_assembly_base< D >::operator[] ( size_type i)
inline

Definition at line 604 of file xoptional_assembly_base.hpp.

◆ operator[]() [4/6]

template<class D >
auto xt::xoptional_assembly_base< D >::operator[] ( size_type i) const
inline

Definition at line 631 of file xoptional_assembly_base.hpp.

◆ operator[]() [5/6]

template<class D >
template<class I >
auto xt::xoptional_assembly_base< D >::operator[] ( std::initializer_list< I > index) -> reference
inline

Definition at line 598 of file xoptional_assembly_base.hpp.

◆ operator[]() [6/6]

template<class D >
template<class I >
auto xt::xoptional_assembly_base< D >::operator[] ( std::initializer_list< I > index) const -> const_reference
inline

Definition at line 625 of file xoptional_assembly_base.hpp.

◆ periodic() [1/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::periodic ( Args... args) -> reference
inline

Returns a reference to the element at the specified position in the optional assembly, after applying periodicity to the indices (negative and 'overflowing' indices are changed).

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the optional assembly.

Definition at line 645 of file xoptional_assembly_base.hpp.

◆ periodic() [2/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::periodic ( Args... args) const -> const_reference
inline

Returns a constant reference to the element at the specified position in the optional assembly, after applying periodicity to the indices (negative and 'overflowing' indices are changed).

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the optional assembly.

Definition at line 659 of file xoptional_assembly_base.hpp.

◆ rbegin() [1/4]

template<class D >
template<layout_type L>
auto xt::xconst_iterable< D >::rbegin ( ) const -> const_reverse_layout_iterator<L>
inlinenoexcept

Returns a constant iterator to the first element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 191 of file xiterable.hpp.

◆ rbegin() [2/4]

template<class D >
template<layout_type L>
auto xt::xiterable< D >::rbegin ( ) -> reverse_layout_iterator<L>
inlinenoexcept

Returns an iterator to the first element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 786 of file xiterable.hpp.

◆ rbegin() [3/4]

template<class D >
template<layout_type L, class S >
auto xt::xconst_iterable< D >::rbegin ( const S & shape) const -> const_reverse_broadcast_iterator<S, L>
inlinenoexcept

Returns a constant iterator to the first element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 191 of file xiterable.hpp.

◆ rbegin() [4/4]

template<class D >
template<layout_type L, class S >
auto xt::xiterable< D >::rbegin ( const S & shape) -> reverse_broadcast_iterator<S, L>
inlinenoexcept

Returns an iterator to the first element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 852 of file xiterable.hpp.

◆ rend() [1/4]

template<class D >
template<layout_type L>
auto xt::xconst_iterable< D >::rend ( ) const -> const_reverse_layout_iterator<L>
inlinenoexcept

Returns a constant iterator to the element following the last element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 192 of file xiterable.hpp.

◆ rend() [2/4]

template<class D >
template<layout_type L>
auto xt::xiterable< D >::rend ( ) -> reverse_layout_iterator<L>
inlinenoexcept

Returns an iterator to the element following the last element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 798 of file xiterable.hpp.

◆ rend() [3/4]

template<class D >
template<layout_type L, class S >
auto xt::xconst_iterable< D >::rend ( const S & shape) const -> const_reverse_broadcast_iterator<S, L>
inlinenoexcept

Returns a constant iterator to the element following the last element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 192 of file xiterable.hpp.

◆ rend() [4/4]

template<class D >
template<layout_type L, class S >
auto xt::xiterable< D >::rend ( const S & shape) -> reverse_broadcast_iterator<S, L>
inlinenoexcept

Returns an iterator to the element following the last element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 866 of file xiterable.hpp.

◆ reshape() [1/2]

template<class D >
template<class S >
auto & xt::xoptional_assembly_base< D >::reshape ( const S & shape,
layout_type layout = static_layout ) &
inline

Reshapes the optional assembly.

Parameters
shapethe new shape
layoutthe new layout

Definition at line 426 of file xoptional_assembly_base.hpp.

◆ reshape() [2/2]

template<class D >
template<class T >
auto & xt::xoptional_assembly_base< D >::reshape ( std::initializer_list< T > shape,
layout_type layout = static_layout ) &
inline

Definition at line 435 of file xoptional_assembly_base.hpp.

◆ resize() [1/3]

template<class D >
template<class S >
void xt::xoptional_assembly_base< D >::resize ( const S & shape,
bool force = false )
inline

Resizes the optional assembly.

Parameters
shapethe new shape
forceforce reshaping, even if the shape stays the same (default: false)

Definition at line 387 of file xoptional_assembly_base.hpp.

◆ resize() [2/3]

template<class D >
template<class S >
void xt::xoptional_assembly_base< D >::resize ( const S & shape,
const strides_type & strides )
inline

Resizes the optional assembly.

Parameters
shapethe new shape
stridesthe new strides

Definition at line 413 of file xoptional_assembly_base.hpp.

◆ resize() [3/3]

template<class D >
template<class S >
void xt::xoptional_assembly_base< D >::resize ( const S & shape,
layout_type l )
inline

Resizes the optional assembly.

Parameters
shapethe new shape
lthe new layout_type

Definition at line 400 of file xoptional_assembly_base.hpp.

◆ shape() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::shape ( ) const
inlinenoexcept

Returns the shape of the optional assembly.

Definition at line 346 of file xoptional_assembly_base.hpp.

◆ shape() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::shape ( size_type index) const
inline

Returns the i-th dimension of the expression.

Definition at line 355 of file xoptional_assembly_base.hpp.

◆ size()

template<class D >
auto xt::xoptional_assembly_base< D >::size ( ) const
inlinenoexcept

Returns the number of element in the optional assembly.

Definition at line 328 of file xoptional_assembly_base.hpp.

◆ stepper_begin() [1/2]

template<class D >
template<class S >
auto xt::xoptional_assembly_base< D >::stepper_begin ( const S & shape) const -> const_stepper
inlinenoexcept

Definition at line 914 of file xoptional_assembly_base.hpp.

◆ stepper_begin() [2/2]

template<class D >
template<class S >
auto xt::xoptional_assembly_base< D >::stepper_begin ( const S & shape) -> stepper
inlinenoexcept

Definition at line 900 of file xoptional_assembly_base.hpp.

◆ stepper_end() [1/2]

template<class D >
template<class S >
auto xt::xoptional_assembly_base< D >::stepper_end ( const S & shape,
layout_type l ) const -> const_stepper
inlinenoexcept

Definition at line 921 of file xoptional_assembly_base.hpp.

◆ stepper_end() [2/2]

template<class D >
template<class S >
auto xt::xoptional_assembly_base< D >::stepper_end ( const S & shape,
layout_type l ) -> stepper
inlinenoexcept

Definition at line 907 of file xoptional_assembly_base.hpp.

◆ storage() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::storage ( ) const
inlinenoexcept

Definition at line 771 of file xoptional_assembly_base.hpp.

◆ storage() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::storage ( )
inlinenoexcept

Definition at line 765 of file xoptional_assembly_base.hpp.

◆ strides()

template<class D >
auto xt::xoptional_assembly_base< D >::strides ( ) const
inlinenoexcept

Returns the strides of the optional assembly.

Definition at line 364 of file xoptional_assembly_base.hpp.

◆ unchecked() [1/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::unchecked ( Args... args) -> reference
inline

Returns a reference to the element at the specified position in the optional assembly.

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices must be equal to the number of dimensions of the optional assembly, else the behavior is undefined.
Warning
This method is meant for performance, for expressions with a dynamic number of dimensions (i.e. not known at compile time). Since it may have undefined behavior (see parameters), operator() should be preferred whenever it is possible.
This method is NOT compatible with broadcasting, meaning the following code has undefined behavior:
xt::xarray<double> a = {{0, 1}, {2, 3}};
xt::xarray<double> b = {0, 1};
auto fd = a + b;
double res = fd.uncheked(0, 1);

Definition at line 552 of file xoptional_assembly_base.hpp.

◆ unchecked() [2/2]

template<class D >
template<class... Args>
auto xt::xoptional_assembly_base< D >::unchecked ( Args... args) const -> const_reference
inline

Returns a constant reference to the element at the specified position in the optional assembly.

Parameters
argsa list of indices specifying the position in the optional assembly. Indices must be unsigned integers, the number of indices must be equal to the number of dimensions of the optional assembly, else the behavior is undefined.
Warning
This method is meant for performance, for expressions with a dynamic number of dimensions (i.e. not known at compile time). Since it may have undefined behavior (see parameters), operator() should be preferred whenever it is possible.
This method is NOT compatible with broadcasting, meaning the following code has undefined behavior:
xt::xarray<double> a = {{0, 1}, {2, 3}};
xt::xarray<double> b = {0, 1};
auto fd = a + b;
double res = fd.uncheked(0, 1);

Definition at line 578 of file xoptional_assembly_base.hpp.

◆ value() [1/2]

template<class D >
auto xt::xoptional_assembly_base< D >::value ( ) const
inlinenoexcept

Return a constant expression for the values of the optional assembly.

Definition at line 940 of file xoptional_assembly_base.hpp.

◆ value() [2/2]

template<class D >
auto xt::xoptional_assembly_base< D >::value ( )
inlinenoexcept

Return an expression for the values of the optional assembly.

Definition at line 931 of file xoptional_assembly_base.hpp.

Friends And Related Symbol Documentation

◆ xconst_iterable< D >

template<class D >
friend class xconst_iterable< D >
friend

Definition at line 265 of file xoptional_assembly_base.hpp.

◆ xiterable< D >

template<class D >
friend class xiterable< D >
friend

Definition at line 265 of file xoptional_assembly_base.hpp.

Member Data Documentation

◆ contiguous_layout

template<class D >
constexpr bool xt::xoptional_assembly_base< D >::contiguous_layout = raw_value_expression::contiguous_layout
staticconstexpr

Definition at line 82 of file xoptional_assembly_base.hpp.

◆ static_layout

template<class D >
constexpr layout_type xt::xoptional_assembly_base< D >::static_layout = raw_value_expression::static_layout
staticconstexpr

Definition at line 81 of file xoptional_assembly_base.hpp.


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