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< self_type > xt::xcontainer_semantic< self_type > xt::xview_semantic< self_type > xt::xview_semantic< xmasked_view< CTD, CTM > > xt::xchunked_semantic< D > xt::xcontainer_semantic< D > xt::xview_semantic< D > xt::xmasked_view< CTD, CTM > xt::xarray_adaptor< value_container &, L, SC > xt::xarray_adaptor< flag_container &, L, SC > xt::xarray_adaptor< const value_container &, L, SC > xt::xarray_adaptor< const flag_container &, L, SC > xt::xarray_adaptor< EC, L, SC, xoptional_expression_tag > xt::xarray_container< temporary_container_t< storage_type >, L, SC, Tag > xt::xarray_container< EC, L, SC, xoptional_expression_tag > xt::xarray_container< uvector< T, A >, L, xt::svector< typename uvector< T, A >::size_type, 4, SA, true > > xt::xarray_container< xtl::xoptional_vector< T, A, BC >, L, xt::svector< typename uvector< T, A >::size_type, 4, SA, true >, xoptional_expression_tag > xt::xfixed_container< typename storage_type::value_type, S, L, SH, Tag > xt::xfixed_container< T, FSH, L, Sharable > xt::xoptional_assembly< raw_value_expression, raw_flag_expression > xt::xtensor_adaptor< value_container &, N, L > xt::xtensor_adaptor< flag_container &, N, L > xt::xtensor_adaptor< const value_container &, N, L > xt::xtensor_adaptor< const flag_container &, N, L > xt::xtensor_adaptor< EC, N, L, xoptional_expression_tag > xt::xtensor_container< std::vector< T, A >, 2, layout_type::row_major > xt::xtensor_container< EC, N, L, xoptional_expression_tag > xt::xtensor_container< temporary_container_t< storage_type >, N, L, Tag > xt::xtensor_container< uvector< T, A >, N, L > xt::xtensor_container< xtl::xoptional_vector< T, A, BC >, N, L, xoptional_expression_tag > xt::xdynamic_view< CT, S, L, FST > xt::xdynamic_view< E, S, L, typename FST::template rebind_t< E > > xt::xdynamic_view< uvt, S, L, typename FST::template rebind_t< uvt > > xt::xdynamic_view< uft, S, L, typename FST::template rebind_t< uft > > xt::xdynamic_view< ucvt, S, L, typename FST::template rebind_t< ucvt > > xt::xdynamic_view< ucft, S, L, typename FST::template rebind_t< ucft > > xt::xfunctor_view< F, E > xt::xfunctor_view< F, uvt > xt::xfunctor_view< F, ucvt > xt::xindex_view< E, I > xt::xindex_view< uvt, I > xt::xindex_view< uft, I > xt::xindex_view< ucvt, I > xt::xindex_view< ucft, I > xt::xstrided_view< CT, shape_type > xt::xstrided_view< uvt, S, L, typename FST::template rebind_t< uvt > > xt::xstrided_view< uft, S, L, typename FST::template rebind_t< uft > > xt::xstrided_view< ucvt, S, L, typename FST::template rebind_t< ucvt > > xt::xstrided_view< ucft, S, L, typename FST::template rebind_t< ucft > > xt::xstrided_view< CT, S, L, FST > xt::xstrided_view< E, S, L, typename FST::template rebind_t< E > > xt::xtensor_view< EC, N, L, xoptional_expression_tag > xt::xview< uvt, S... > xt::xview< uft, S... > xt::xview< ucvt, S... > xt::xview< ucft, S... > xt::xview< E, S... > xt::xdynamic_view< CT, S, L, FST > xt::xstrided_view< CT, S, L, FST >

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: