xtensor
Loading...
Searching...
No Matches
xt::xmasked_view< CTD, CTM > Class Template Reference

View on an xoptional_assembly or xoptional_assembly_adaptor hiding values depending on a given mask. More...

#include <xmasked_view.hpp>

Inheritance diagram for xt::xmasked_view< CTD, CTM >:
xt::xview_semantic< xmasked_view< CTD, CTM > > xt::xaccessible< xmasked_view< CTD, CTM > > xt::xiterable< xmasked_view< CTD, CTM > > xt::xsemantic_base< D >

Public Types

using self_type = xmasked_view<CTD, CTM>
 
using semantic_base = xview_semantic<xmasked_view<CTD, CTM>>
 
using accessible_base = xaccessible<self_type>
 
using inner_types = xcontainer_inner_types<self_type>
 
using temporary_type = typename inner_types::temporary_type
 
using data_type = typename inner_types::data_type
 
using mask_type = typename inner_types::mask_type
 
using value_expression = CTD
 
using mask_expression = CTM
 
using base_value_type = typename inner_types::base_value_type
 
using base_reference = typename data_type::reference
 
using base_const_reference = typename data_type::const_reference
 
using flag_type = typename inner_types::flag_type
 
using flag_reference = typename mask_type::reference
 
using flag_const_reference = typename mask_type::const_reference
 
using val_reference = typename inner_types::val_reference
 
using mask_reference = typename inner_types::mask_reference
 
using value_type = typename inner_types::value_type
 
using reference = typename inner_types::reference
 
using const_reference = typename inner_types::const_reference
 
using pointer = xtl::xclosure_pointer<reference>
 
using const_pointer = xtl::xclosure_pointer<const_reference>
 
using size_type = typename inner_types::size_type
 
using difference_type = typename data_type::difference_type
 
using bool_load_type = xtl::xmasked_value<typename data_type::bool_load_type, mask_type>
 
using shape_type = typename data_type::shape_type
 
using strides_type = typename data_type::strides_type
 
using inner_shape_type = typename data_type::inner_shape_type
 
using inner_strides_type = typename data_type::inner_strides_type
 
using inner_backstrides_type = typename data_type::inner_backstrides_type
 
using expression_tag = xtensor_expression_tag
 
using iterable_base = xiterable<xmasked_view<CTD, CTM>>
 
using stepper = typename iterable_base::stepper
 
using const_stepper = typename iterable_base::const_stepper
 
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 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 Types inherited from xt::xview_semantic< xmasked_view< CTD, CTM > >
using base_type
 
using derived_type
 
using temporary_type
 
- Public Types inherited from xt::xsemantic_base< D >
using base_type = select_expression_base_t<D>
 
using derived_type = typename base_type::derived_type
 
using temporary_type = typename xcontainer_inner_types<D>::temporary_type
 

Public Member Functions

 xmasked_view (const xmasked_view &)=default
 
template<class... Args>
reference operator() (Args... args)
 
template<class... Args>
const_reference operator() (Args... args) const
 
template<class... Args>
reference unchecked (Args... args)
 
template<class... Args>
const_reference unchecked (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<class E >
self_typeoperator= (const xexpression< E > &e)
 
template<class E >
disable_xexpression< E, self_type > & operator= (const E &e)
 
template<class... Args>
reference at (Args... args)
 
template<class... Args>
auto at (Args... args) -> reference
 Returns a reference to the element at the specified position in the expression, after dimension and bounds checking.
 
template<class... Args>
const_reference at (Args... args) const
 
template<class... Args>
auto at (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking.
 
reference back ()
 Returns a reference to the last element of the expression.
 
const_reference back () const
 Returns a constant reference to last the element of the expression.
 
reference front ()
 Returns a reference to the first element of the expression.
 
const_reference front () const
 Returns a constant reference to first the element of the expression.
 
template<class... Args>
reference periodic (Args... args)
 
template<class... Args>
auto periodic (Args... args) -> reference
 Returns a reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
 
template<class... Args>
const_reference periodic (Args... args) const
 
template<class... Args>
auto periodic (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
 
Constructors
template<class D , class M >
 xmasked_view (D &&data, M &&mask)
 Creates an xmasked_view, given the xoptional_assembly or xoptional_assembly_adaptor and the mask.
 
Size and shape
size_type size () const noexcept
 Returns the number of elements in the xmasked_view.
 
const inner_shape_type & shape () const noexcept
 Returns the shape of the xmasked_view.
 
const inner_strides_type & strides () const noexcept
 Returns the strides of the xmasked_view.
 
const inner_backstrides_type & backstrides () const noexcept
 Returns the backstrides of the xmasked_view.
 
layout_type layout () const noexcept
 Return the layout_type of the xmasked_view.
 
bool is_contiguous () const noexcept
 
template<class T >
void fill (const T &value)
 Fills the data with the given value.
 
- Public Member Functions inherited from xt::xview_semantic< xmasked_view< CTD, CTM > >
derived_typeassign_xexpression (const xexpression< E > &e)
 
derived_typecomputed_assign (const xexpression< E > &e)
 
derived_typescalar_computed_assign (const E &e, F &&f)
 
derived_typeassign_temporary (temporary_type &&)
 Assigns the temporary tmp to *this.
 
auto assign_xexpression (const xexpression< E > &e) -> derived_type &
 
auto computed_assign (const xexpression< E > &e) -> derived_type &
 
auto scalar_computed_assign (const E &e, F &&f) -> derived_type &
 
auto operator= (const xexpression< E > &rhs) -> derived_type &
 
- Public Member Functions inherited from xt::xsemantic_base< D >
template<class E >
disable_xexpression< E, derived_type & > operator+= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator-= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator*= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator/= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator%= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator&= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator|= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator^= (const E &)
 
template<class E >
derived_type & operator+= (const xexpression< E > &)
 
template<class E >
derived_type & operator-= (const xexpression< E > &)
 
template<class E >
derived_type & operator*= (const xexpression< E > &)
 
template<class E >
derived_type & operator/= (const xexpression< E > &)
 
template<class E >
derived_type & operator%= (const xexpression< E > &)
 
template<class E >
derived_type & operator&= (const xexpression< E > &)
 
template<class E >
derived_type & operator|= (const xexpression< E > &)
 
template<class E >
derived_type & operator^= (const xexpression< E > &)
 
template<class E >
derived_type & assign (const xexpression< E > &)
 
template<class E >
derived_type & plus_assign (const xexpression< E > &)
 
template<class E >
derived_type & minus_assign (const xexpression< E > &)
 
template<class E >
derived_type & multiplies_assign (const xexpression< E > &)
 
template<class E >
derived_type & divides_assign (const xexpression< E > &)
 
template<class E >
derived_type & modulus_assign (const xexpression< E > &)
 
template<class E >
derived_type & bit_and_assign (const xexpression< E > &)
 
template<class E >
derived_type & bit_or_assign (const xexpression< E > &)
 
template<class E >
derived_type & bit_xor_assign (const xexpression< E > &)
 
template<class E >
auto operator+= (const E &e) -> disable_xexpression< E, derived_type & >
 Adds the scalar e to *this.
 
template<class E >
auto operator-= (const E &e) -> disable_xexpression< E, derived_type & >
 Subtracts the scalar e from *this.
 
template<class E >
auto operator*= (const E &e) -> disable_xexpression< E, derived_type & >
 Multiplies *this with the scalar e.
 
template<class E >
auto operator/= (const E &e) -> disable_xexpression< E, derived_type & >
 Divides *this by the scalar e.
 
template<class E >
auto operator%= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the remainder of *this after division by the scalar e.
 
template<class E >
auto operator&= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the bitwise and of *this and the scalar e and assigns it to *this.
 
template<class E >
auto operator|= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the bitwise or of *this and the scalar e and assigns it to *this.
 
template<class E >
auto operator^= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the bitwise xor of *this and the scalar e and assigns it to *this.
 
template<class E >
auto operator+= (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
template<class E >
auto operator-= (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e from *this.
 
template<class E >
auto operator*= (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
template<class E >
auto operator/= (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
template<class E >
auto operator%= (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
template<class E >
auto operator&= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of *this and the xexpression e and assigns it to *this.
 
template<class E >
auto operator|= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of *this and the xexpression e and assigns it to *this.
 
template<class E >
auto operator^= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of *this and the xexpression e and assigns it to *this.
 
template<class E >
auto assign (const xexpression< E > &e) -> derived_type &
 Assigns the xexpression e to *this.
 
template<class E >
auto plus_assign (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
template<class E >
auto minus_assign (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e to *this.
 
template<class E >
auto multiplies_assign (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
template<class E >
auto divides_assign (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
template<class E >
auto modulus_assign (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
template<class E >
auto bit_and_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of e to *this.
 
template<class E >
auto bit_or_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of e to *this.
 
template<class E >
auto bit_xor_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of e to *this.
 
template<class E >
auto operator= (const xexpression< E > &e) -> derived_type &
 

Static Public Attributes

static constexpr bool is_data_const = std::is_const<std::remove_reference_t<value_expression>>::value
 
static constexpr layout_type static_layout = data_type::static_layout
 
static constexpr bool contiguous_layout = false
 

Friends

class xiterable< self_type >
 
class xconst_iterable< self_type >
 
class xview_semantic< self_type >
 
class xaccessible< self_type >
 
class xconst_accessible< self_type >
 

Data

template<class S >
bool has_linear_assign (const S &strides) const noexcept
 
data_type & value () noexcept
 Return an expression for the values of the xmasked_view.
 
const data_type & value () const noexcept
 Return a constant expression for the values of the xmasked_view.
 
mask_type & visible () noexcept
 Return an expression for the mask of the xmasked_view.
 
const mask_type & visible () const noexcept
 Return a constant expression for the mask of the xmasked_view.
 
self_typeoperator= (const self_type &rhs)
 
template<class... Args>
auto operator() (Args... args) -> reference
 Returns a reference to the element at the specified position in the xmasked_view.
 
template<class... Args>
auto operator() (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the xmasked_view.
 
template<class... Args>
auto unchecked (Args... args) -> reference
 Returns a reference to the element at the specified position in the xmasked_view.
 
template<class... Args>
auto unchecked (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the xmasked_view.
 
template<class It >
auto element (It first, It last) -> reference
 Returns a reference to the element at the specified position in the xmasked_view.
 
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 xmasked_view.
 
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
 
template<class E >
auto operator= (const xexpression< E > &e) -> self_type &
 
template<class E >
auto operator= (const E &e) -> disable_xexpression< E, self_type > &
 

Additional Inherited Members

- Protected Member Functions inherited from xt::xview_semantic< xmasked_view< CTD, CTM > >
 xview_semantic (const xview_semantic &)=default
 
 xview_semantic (xview_semantic &&)=default
 
xview_semanticoperator= (const xview_semantic &)=default
 
xview_semanticoperator= (xview_semantic &&)=default
 
derived_typeoperator= (const xexpression< E > &)
 
- Protected Member Functions inherited from xt::xsemantic_base< D >
 xsemantic_base (const xsemantic_base &)=default
 
xsemantic_baseoperator= (const xsemantic_base &)=default
 
 xsemantic_base (xsemantic_base &&)=default
 
xsemantic_baseoperator= (xsemantic_base &&)=default
 
template<class E >
derived_type & operator= (const xexpression< E > &)
 

Detailed Description

template<class CTD, class CTM>
class xt::xmasked_view< CTD, CTM >

View on an xoptional_assembly or xoptional_assembly_adaptor hiding values depending on a given mask.

The xmasked_view class implements a view on an xoptional_assembly or xoptional_assembly_adaptor, it takes this xoptional_assembly and a mask as input. The mask is an xexpression containing boolean values, whenever the value of the mask is false, the optional value of xmasked_view is considered missing, otherwise it depends on the underlying xoptional_assembly.

Template Parameters
CTDThe type of expression holding the values.
CTMThe type of expression holding the mask.

Definition at line 78 of file xmasked_view.hpp.

Member Typedef Documentation

◆ accessible_base

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::accessible_base = xaccessible<self_type>

Definition at line 86 of file xmasked_view.hpp.

◆ base_const_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::base_const_reference = typename data_type::const_reference

Definition at line 99 of file xmasked_view.hpp.

◆ base_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::base_reference = typename data_type::reference

Definition at line 98 of file xmasked_view.hpp.

◆ base_value_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::base_value_type = typename inner_types::base_value_type

Definition at line 97 of file xmasked_view.hpp.

◆ bool_load_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::bool_load_type = xtl::xmasked_value<typename data_type::bool_load_type, mask_type>

Definition at line 118 of file xmasked_view.hpp.

◆ broadcast_iterator

template<class CTD , class CTM >
template<class S , layout_type L>
using xt::xmasked_view< CTD, CTM >::broadcast_iterator = typename iterable_base::template broadcast_iterator<S, L>

Definition at line 146 of file xmasked_view.hpp.

◆ const_broadcast_iterator

template<class CTD , class CTM >
template<class S , layout_type L>
using xt::xmasked_view< CTD, CTM >::const_broadcast_iterator = typename iterable_base::template const_broadcast_iterator<S, L>

Definition at line 148 of file xmasked_view.hpp.

◆ const_iterator

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::const_iterator = typename iterable_base::const_iterator

Definition at line 155 of file xmasked_view.hpp.

◆ const_layout_iterator

template<class CTD , class CTM >
template<layout_type L>
using xt::xmasked_view< CTD, CTM >::const_layout_iterator = typename iterable_base::template const_layout_iterator<L>

Definition at line 139 of file xmasked_view.hpp.

◆ const_pointer

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::const_pointer = xtl::xclosure_pointer<const_reference>

Definition at line 113 of file xmasked_view.hpp.

◆ const_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::const_reference = typename inner_types::const_reference

Definition at line 110 of file xmasked_view.hpp.

◆ const_reverse_broadcast_iterator

template<class CTD , class CTM >
template<class S , layout_type L>
using xt::xmasked_view< CTD, CTM >::const_reverse_broadcast_iterator = typename iterable_base::template const_reverse_broadcast_iterator<S, L>

Definition at line 152 of file xmasked_view.hpp.

◆ const_reverse_iterator

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::const_reverse_iterator = typename iterable_base::const_reverse_iterator

Definition at line 157 of file xmasked_view.hpp.

◆ const_reverse_layout_iterator

template<class CTD , class CTM >
template<layout_type L>
using xt::xmasked_view< CTD, CTM >::const_reverse_layout_iterator = typename iterable_base::template const_reverse_layout_iterator<L>

Definition at line 143 of file xmasked_view.hpp.

◆ const_stepper

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::const_stepper = typename iterable_base::const_stepper

Definition at line 134 of file xmasked_view.hpp.

◆ data_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::data_type = typename inner_types::data_type

Definition at line 90 of file xmasked_view.hpp.

◆ difference_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::difference_type = typename data_type::difference_type

Definition at line 116 of file xmasked_view.hpp.

◆ expression_tag

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::expression_tag = xtensor_expression_tag

Definition at line 130 of file xmasked_view.hpp.

◆ flag_const_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::flag_const_reference = typename mask_type::const_reference

Definition at line 103 of file xmasked_view.hpp.

◆ flag_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::flag_reference = typename mask_type::reference

Definition at line 102 of file xmasked_view.hpp.

◆ flag_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::flag_type = typename inner_types::flag_type

Definition at line 101 of file xmasked_view.hpp.

◆ inner_backstrides_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::inner_backstrides_type = typename data_type::inner_backstrides_type

Definition at line 128 of file xmasked_view.hpp.

◆ inner_shape_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::inner_shape_type = typename data_type::inner_shape_type

Definition at line 126 of file xmasked_view.hpp.

◆ inner_strides_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::inner_strides_type = typename data_type::inner_strides_type

Definition at line 127 of file xmasked_view.hpp.

◆ inner_types

Definition at line 87 of file xmasked_view.hpp.

◆ iterable_base

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::iterable_base = xiterable<xmasked_view<CTD, CTM>>

Definition at line 132 of file xmasked_view.hpp.

◆ iterator

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::iterator = typename iterable_base::iterator

Definition at line 154 of file xmasked_view.hpp.

◆ layout_iterator

template<class CTD , class CTM >
template<layout_type L>
using xt::xmasked_view< CTD, CTM >::layout_iterator = typename iterable_base::template layout_iterator<L>

Definition at line 137 of file xmasked_view.hpp.

◆ mask_expression

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::mask_expression = CTM

Definition at line 93 of file xmasked_view.hpp.

◆ mask_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::mask_reference = typename inner_types::mask_reference

Definition at line 106 of file xmasked_view.hpp.

◆ mask_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::mask_type = typename inner_types::mask_type

Definition at line 91 of file xmasked_view.hpp.

◆ pointer

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::pointer = xtl::xclosure_pointer<reference>

Definition at line 112 of file xmasked_view.hpp.

◆ reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::reference = typename inner_types::reference

Definition at line 109 of file xmasked_view.hpp.

◆ reverse_broadcast_iterator

template<class CTD , class CTM >
template<class S , layout_type L>
using xt::xmasked_view< CTD, CTM >::reverse_broadcast_iterator = typename iterable_base::template reverse_broadcast_iterator<S, L>

Definition at line 150 of file xmasked_view.hpp.

◆ reverse_iterator

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::reverse_iterator = typename iterable_base::reverse_iterator

Definition at line 156 of file xmasked_view.hpp.

◆ reverse_layout_iterator

template<class CTD , class CTM >
template<layout_type L>
using xt::xmasked_view< CTD, CTM >::reverse_layout_iterator = typename iterable_base::template reverse_layout_iterator<L>

Definition at line 141 of file xmasked_view.hpp.

◆ self_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::self_type = xmasked_view<CTD, CTM>

Definition at line 84 of file xmasked_view.hpp.

◆ semantic_base

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::semantic_base = xview_semantic<xmasked_view<CTD, CTM>>

Definition at line 85 of file xmasked_view.hpp.

◆ shape_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::shape_type = typename data_type::shape_type

Definition at line 120 of file xmasked_view.hpp.

◆ size_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::size_type = typename inner_types::size_type

Definition at line 115 of file xmasked_view.hpp.

◆ stepper

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::stepper = typename iterable_base::stepper

Definition at line 133 of file xmasked_view.hpp.

◆ strides_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::strides_type = typename data_type::strides_type

Definition at line 121 of file xmasked_view.hpp.

◆ temporary_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::temporary_type = typename inner_types::temporary_type

Definition at line 88 of file xmasked_view.hpp.

◆ val_reference

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::val_reference = typename inner_types::val_reference

Definition at line 105 of file xmasked_view.hpp.

◆ value_expression

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::value_expression = CTD

Definition at line 92 of file xmasked_view.hpp.

◆ value_type

template<class CTD , class CTM >
using xt::xmasked_view< CTD, CTM >::value_type = typename inner_types::value_type

Definition at line 108 of file xmasked_view.hpp.

Constructor & Destructor Documentation

◆ xmasked_view()

template<class CTD , class CTM >
template<class D , class M >
xt::xmasked_view< CTD, CTM >::xmasked_view ( D && data,
M && mask )
inline

Creates an xmasked_view, given the xoptional_assembly or xoptional_assembly_adaptor and the mask.

Parameters
datathe underlying xoptional_assembly or xoptional_assembly_adaptor
maskthe mask.

Definition at line 309 of file xmasked_view.hpp.

Member Function Documentation

◆ at() [1/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xaccessible< D >::at ( Args... args) -> reference
inline

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

Parameters
argsa list of indices specifying the position in the expression. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the expression.
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 274 of file xaccessible.hpp.

◆ at() [2/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xconst_accessible< D >::at ( Args... args) const -> const_reference
inline

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

Parameters
argsa list of indices specifying the position in the expression. Indices must be unsigned integers, the number of indices should be equal to the number of dimensions of the expression.
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 111 of file xaccessible.hpp.

◆ back() [1/2]

template<class CTD , class CTM >
auto xt::xaccessible< D >::back ( )
inline

Returns a reference to the last element of the expression.

Definition at line 109 of file xaccessible.hpp.

◆ back() [2/2]

template<class CTD , class CTM >
auto xt::xconst_accessible< D >::back ( ) const
inline

Returns a constant reference to last the element of the expression.

Definition at line 113 of file xaccessible.hpp.

◆ backstrides()

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::backstrides ( ) const
inlinenoexcept

Returns the backstrides of the xmasked_view.

Definition at line 350 of file xmasked_view.hpp.

◆ element() [1/2]

template<class CTD , class CTM >
template<class It >
auto xt::xmasked_view< CTD, CTM >::element ( It first,
It last ) -> reference
inline

Returns a reference to the element at the specified position in the xmasked_view.

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 xmasked_view.

Definition at line 475 of file xmasked_view.hpp.

◆ element() [2/2]

template<class CTD , class CTM >
template<class It >
auto xt::xmasked_view< CTD, CTM >::element ( It first,
It last ) const -> const_reference
inline

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

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 xmasked_view.

Definition at line 489 of file xmasked_view.hpp.

◆ fill()

template<class CTD , class CTM >
template<class T >
void xt::xmasked_view< CTD, CTM >::fill ( const T & value)
inline

Fills the data with the given value.

Parameters
valuethe value to fill the data with.

Definition at line 379 of file xmasked_view.hpp.

◆ front() [1/2]

template<class CTD , class CTM >
auto xt::xaccessible< D >::front ( )
inline

Returns a reference to the first element of the expression.

Definition at line 108 of file xaccessible.hpp.

◆ front() [2/2]

template<class CTD , class CTM >
auto xt::xconst_accessible< D >::front ( ) const
inline

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

Definition at line 114 of file xaccessible.hpp.

◆ has_linear_assign()

template<class CTD , class CTM >
template<class S >
bool xt::xmasked_view< CTD, CTM >::has_linear_assign ( const S & strides) const
inlinenoexcept

Definition at line 498 of file xmasked_view.hpp.

◆ is_contiguous()

template<class CTD , class CTM >
bool xt::xmasked_view< CTD, CTM >::is_contiguous ( ) const
inlinenoexcept

Definition at line 368 of file xmasked_view.hpp.

◆ layout()

template<class CTD , class CTM >
layout_type xt::xmasked_view< CTD, CTM >::layout ( ) const
inlinenoexcept

Return the layout_type of the xmasked_view.

Returns
layout_type of the xmasked_view

Definition at line 362 of file xmasked_view.hpp.

◆ operator()() [1/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xmasked_view< CTD, CTM >::operator() ( Args... args) -> reference
inline

Returns a reference to the element at the specified position in the xmasked_view.

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

Definition at line 396 of file xmasked_view.hpp.

◆ operator()() [2/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xmasked_view< CTD, CTM >::operator() ( Args... args) const -> const_reference
inline

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

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

Definition at line 409 of file xmasked_view.hpp.

◆ operator=() [1/3]

template<class CTD , class CTM >
template<class E >
auto xt::xmasked_view< CTD, CTM >::operator= ( const E & e) -> disable_xexpression<E, self_type>&
inline

Definition at line 584 of file xmasked_view.hpp.

◆ operator=() [2/3]

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::operator= ( const self_type & rhs)
inline

Definition at line 569 of file xmasked_view.hpp.

◆ operator=() [3/3]

template<class CTD , class CTM >
template<class E >
auto xt::xmasked_view< CTD, CTM >::operator= ( const xexpression< E > & e) -> self_type&
inline

Definition at line 577 of file xmasked_view.hpp.

◆ periodic() [1/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xaccessible< D >::periodic ( Args... args) -> reference
inline

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

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

Definition at line 315 of file xaccessible.hpp.

◆ periodic() [2/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xconst_accessible< D >::periodic ( Args... args) const -> const_reference
inline

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

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

Definition at line 115 of file xaccessible.hpp.

◆ shape()

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::shape ( ) const
inlinenoexcept

Returns the shape of the xmasked_view.

Definition at line 332 of file xmasked_view.hpp.

◆ size()

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::size ( ) const
inlinenoexcept

Returns the number of elements in the xmasked_view.

Definition at line 323 of file xmasked_view.hpp.

◆ stepper_begin() [1/2]

template<class CTD , class CTM >
template<class S >
auto xt::xmasked_view< CTD, CTM >::stepper_begin ( const S & shape) const -> const_stepper
inlinenoexcept

Definition at line 555 of file xmasked_view.hpp.

◆ stepper_begin() [2/2]

template<class CTD , class CTM >
template<class S >
auto xt::xmasked_view< CTD, CTM >::stepper_begin ( const S & shape) -> stepper
inlinenoexcept

Definition at line 541 of file xmasked_view.hpp.

◆ stepper_end() [1/2]

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

Definition at line 562 of file xmasked_view.hpp.

◆ stepper_end() [2/2]

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

Definition at line 548 of file xmasked_view.hpp.

◆ strides()

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::strides ( ) const
inlinenoexcept

Returns the strides of the xmasked_view.

Definition at line 341 of file xmasked_view.hpp.

◆ unchecked() [1/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xmasked_view< CTD, CTM >::unchecked ( Args... args) -> reference
inline

Returns a reference to the element at the specified position in the xmasked_view.

Parameters
argsa list of indices specifying the position in the xmasked_view. Indices must be unsigned integers, the number of indices must be equal to the number of dimensions of the xmasked_view, 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 435 of file xmasked_view.hpp.

◆ unchecked() [2/2]

template<class CTD , class CTM >
template<class... Args>
auto xt::xmasked_view< CTD, CTM >::unchecked ( Args... args) const -> const_reference
inline

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

Parameters
argsa list of indices specifying the position in the xmasked_view. Indices must be unsigned integers, the number of indices must be equal to the number of dimensions of the xmasked_view, 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 461 of file xmasked_view.hpp.

◆ value() [1/2]

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::value ( ) const
inlinenoexcept

Return a constant expression for the values of the xmasked_view.

Definition at line 516 of file xmasked_view.hpp.

◆ value() [2/2]

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::value ( )
inlinenoexcept

Return an expression for the values of the xmasked_view.

Definition at line 507 of file xmasked_view.hpp.

◆ visible() [1/2]

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::visible ( ) const
inlinenoexcept

Return a constant expression for the mask of the xmasked_view.

Definition at line 534 of file xmasked_view.hpp.

◆ visible() [2/2]

template<class CTD , class CTM >
auto xt::xmasked_view< CTD, CTM >::visible ( )
inlinenoexcept

Return an expression for the mask of the xmasked_view.

Definition at line 525 of file xmasked_view.hpp.

Friends And Related Symbol Documentation

◆ xaccessible< self_type >

template<class CTD , class CTM >
friend class xaccessible< self_type >
friend

Definition at line 243 of file xmasked_view.hpp.

◆ xconst_accessible< self_type >

Definition at line 243 of file xmasked_view.hpp.

◆ xconst_iterable< self_type >

Definition at line 243 of file xmasked_view.hpp.

◆ xiterable< self_type >

template<class CTD , class CTM >
friend class xiterable< self_type >
friend

Definition at line 243 of file xmasked_view.hpp.

◆ xview_semantic< self_type >

Definition at line 243 of file xmasked_view.hpp.

Member Data Documentation

◆ contiguous_layout

template<class CTD , class CTM >
constexpr bool xt::xmasked_view< CTD, CTM >::contiguous_layout = false
staticconstexpr

Definition at line 124 of file xmasked_view.hpp.

◆ is_data_const

template<class CTD , class CTM >
constexpr bool xt::xmasked_view< CTD, CTM >::is_data_const = std::is_const<std::remove_reference_t<value_expression>>::value
staticconstexpr

Definition at line 95 of file xmasked_view.hpp.

◆ static_layout

template<class CTD , class CTM >
constexpr layout_type xt::xmasked_view< CTD, CTM >::static_layout = data_type::static_layout
staticconstexpr

Definition at line 123 of file xmasked_view.hpp.


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