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

Base interface for assignable xexpressions. More...

#include <xsemantic.hpp>

Inheritance diagram for xt::xsemantic_base< D >:
xt::xchunked_semantic< xchunked_array< chunk_storage > > xt::xcontainer_semantic< xarray_adaptor< EC, L, SC, Tag > > xt::xcontainer_semantic< xarray_container< EC, L, SC, Tag > > xt::xcontainer_semantic< xfixed_adaptor< EC, S, L, SH, Tag > > xt::xcontainer_semantic< xfixed_container< ET, S, L, SH, Tag > > xt::xcontainer_semantic< xfunctor_adaptor< F, CT > > xt::xcontainer_semantic< xoptional_assembly< VE, FE > > xt::xcontainer_semantic< xoptional_assembly_adaptor< VEC, FEC > > xt::xcontainer_semantic< xtensor_adaptor< EC, N, L, Tag > > xt::xcontainer_semantic< xtensor_container< EC, N, L, Tag > > xt::xview_semantic< xfunctor_view< F, CT > > xt::xview_semantic< xindex_view< CT, I > > xt::xview_semantic< xmasked_view< CTD, CTM > > xt::xview_semantic< xtensor_view< EC, N, L, Tag > > xt::xview_semantic< xview< CT, S... > > xt::xchunked_semantic< D > xt::xcontainer_semantic< D > xt::xview_semantic< D >

Public Types

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

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 > &)
 
Computed assignement
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.
 
Assign functions
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 &
 

Protected Member Functions

 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 D>
class xt::xsemantic_base< D >

Base interface for assignable xexpressions.

The xsemantic_base class defines the interface for assignable xexpressions.

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

Definition at line 57 of file xsemantic.hpp.

Member Typedef Documentation

◆ base_type

template<class D >
using xt::xsemantic_base< D >::base_type = select_expression_base_t<D>

Definition at line 61 of file xsemantic.hpp.

◆ derived_type

template<class D >
using xt::xsemantic_base< D >::derived_type = typename base_type::derived_type

Definition at line 62 of file xsemantic.hpp.

◆ temporary_type

template<class D >
using xt::xsemantic_base< D >::temporary_type = typename xcontainer_inner_types<D>::temporary_type

Definition at line 64 of file xsemantic.hpp.

Member Function Documentation

◆ assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::assign ( const xexpression< E > & e) -> derived_type&
inline

Assigns the xexpression e to *this.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression to assign.
Returns
a reference to *this.

Definition at line 511 of file xsemantic.hpp.

◆ bit_and_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::bit_and_assign ( const xexpression< E > & e) -> derived_type&
inline

Computes the bitwise and of e to *this.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression to add.
Returns
a reference to *this.

Definition at line 589 of file xsemantic.hpp.

◆ bit_or_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::bit_or_assign ( const xexpression< E > & e) -> derived_type&
inline

Computes the bitwise or of e to *this.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression to add.
Returns
a reference to *this.

Definition at line 602 of file xsemantic.hpp.

◆ bit_xor_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::bit_xor_assign ( const xexpression< E > & e) -> derived_type&
inline

Computes the bitwise xor of e to *this.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression to add.
Returns
a reference to *this.

Definition at line 615 of file xsemantic.hpp.

◆ divides_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::divides_assign ( const xexpression< E > & e) -> derived_type&
inline

Divides *this by the xexpression e.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 563 of file xsemantic.hpp.

◆ minus_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::minus_assign ( const xexpression< E > & e) -> derived_type&
inline

Subtracts the xexpression e to *this.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression to subtract.
Returns
a reference to *this.

Definition at line 537 of file xsemantic.hpp.

◆ modulus_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::modulus_assign ( const xexpression< E > & e) -> derived_type&
inline

Computes the remainder of *this after division by the xexpression e.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 576 of file xsemantic.hpp.

◆ multiplies_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::multiplies_assign ( const xexpression< E > & e) -> derived_type&
inline

Multiplies *this with the xexpression e.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 550 of file xsemantic.hpp.

◆ operator%=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator%= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Computes the remainder of *this after division by the scalar e.

Parameters
ethe scalar involved in the operation.
Returns
a reference to *this.

Definition at line 360 of file xsemantic.hpp.

◆ operator%=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator%= ( const xexpression< E > & e) -> derived_type&
inline

Computes the remainder of *this after division by the xexpression e.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 456 of file xsemantic.hpp.

◆ operator&=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator&= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Computes the bitwise and of *this and the scalar e and assigns it to *this.

Parameters
ethe scalar involved in the operation.
Returns
a reference to *this.

Definition at line 372 of file xsemantic.hpp.

◆ operator&=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator&= ( const xexpression< E > & e) -> derived_type&
inline

Computes the bitwise and of *this and the xexpression e and assigns it to *this.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 468 of file xsemantic.hpp.

◆ operator*=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator*= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Multiplies *this with the scalar e.

Parameters
ethe scalar involved in the operation.
Returns
a reference to *this.

Definition at line 336 of file xsemantic.hpp.

◆ operator*=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator*= ( const xexpression< E > & e) -> derived_type&
inline

Multiplies *this with the xexpression e.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 432 of file xsemantic.hpp.

◆ operator+=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator+= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Adds the scalar e to *this.

Parameters
ethe scalar to add.
Returns
a reference to *this.

Definition at line 312 of file xsemantic.hpp.

◆ operator+=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator+= ( const xexpression< E > & e) -> derived_type&
inline

Adds the xexpression e to *this.

Parameters
ethe xexpression to add.
Returns
a reference to *this.

Definition at line 408 of file xsemantic.hpp.

◆ operator-=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator-= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Subtracts the scalar e from *this.

Parameters
ethe scalar to subtract.
Returns
a reference to *this.

Definition at line 324 of file xsemantic.hpp.

◆ operator-=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator-= ( const xexpression< E > & e) -> derived_type&
inline

Subtracts the xexpression e from *this.

Parameters
ethe xexpression to subtract.
Returns
a reference to *this.

Definition at line 420 of file xsemantic.hpp.

◆ operator/=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator/= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Divides *this by the scalar e.

Parameters
ethe scalar involved in the operation.
Returns
a reference to *this.

Definition at line 348 of file xsemantic.hpp.

◆ operator/=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator/= ( const xexpression< E > & e) -> derived_type&
inline

Divides *this by the xexpression e.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 444 of file xsemantic.hpp.

◆ operator=()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator= ( const xexpression< E > & e) -> derived_type&
inline

Definition at line 622 of file xsemantic.hpp.

◆ operator^=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator^= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Computes the bitwise xor of *this and the scalar e and assigns it to *this.

Parameters
ethe scalar involved in the operation.
Returns
a reference to *this.

Definition at line 396 of file xsemantic.hpp.

◆ operator^=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator^= ( const xexpression< E > & e) -> derived_type&
inline

Computes the bitwise xor of *this and the xexpression e and assigns it to *this.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 492 of file xsemantic.hpp.

◆ operator|=() [1/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator|= ( const E & e) -> disable_xexpression<E, derived_type&>
inline

Computes the bitwise or of *this and the scalar e and assigns it to *this.

Parameters
ethe scalar involved in the operation.
Returns
a reference to *this.

Definition at line 384 of file xsemantic.hpp.

◆ operator|=() [2/2]

template<class D >
template<class E >
auto xt::xsemantic_base< D >::operator|= ( const xexpression< E > & e) -> derived_type&
inline

Computes the bitwise or of *this and the xexpression e and assigns it to *this.

Parameters
ethe xexpression involved in the operation.
Returns
a reference to *this.

Definition at line 480 of file xsemantic.hpp.

◆ plus_assign()

template<class D >
template<class E >
auto xt::xsemantic_base< D >::plus_assign ( const xexpression< E > & e) -> derived_type&
inline

Adds the xexpression e to *this.

Ensures no temporary will be used to perform the assignment.

Parameters
ethe xexpression to add.
Returns
a reference to *this.

Definition at line 524 of file xsemantic.hpp.


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