xtensor
Loading...
Searching...
No Matches
Arithmetic operators

Functions

template<class E >
auto xt::operator+ (E &&e) noexcept -> detail::xfunction_type_t< detail::identity, E >
 Identity.
 
template<class E >
auto xt::operator- (E &&e) noexcept -> detail::xfunction_type_t< detail::negate, E >
 Opposite.
 
template<class E1 , class E2 >
auto xt::operator+ (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::plus, E1, E2 >
 Addition.
 
template<class E1 , class E2 >
auto xt::operator- (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::minus, E1, E2 >
 Substraction.
 
template<class E1 , class E2 >
auto xt::operator* (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::multiplies, E1, E2 >
 Multiplication.
 
template<class E1 , class E2 >
auto xt::operator/ (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::divides, E1, E2 >
 Division.
 
template<class E1 , class E2 >
auto xt::operator% (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::modulus, E1, E2 >
 Modulus.
 

Detailed Description

Function Documentation

◆ operator%()

template<class E1 , class E2 >
auto xt::operator% ( E1 && e1,
E2 && e2 ) -> detail::xfunction_type_t<detail::modulus, E1, E2>
inlinenoexcept

Modulus.

Returns an xfunction for the element-wise modulus of e1 by e2.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
an xfunction

Definition at line 328 of file xoperation.hpp.

◆ operator*()

template<class E1 , class E2 >
auto xt::operator* ( E1 && e1,
E2 && e2 ) -> detail::xfunction_type_t<detail::multiplies, E1, E2>
inlinenoexcept

Multiplication.

Returns an xfunction for the element-wise multiplication of e1 by e2.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
an xfunction

Definition at line 296 of file xoperation.hpp.

◆ operator+() [1/2]

template<class E >
auto xt::operator+ ( E && e) -> detail::xfunction_type_t<detail::identity, E>
inlinenoexcept

Identity.

Returns an xfunction for the element-wise identity of e.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 233 of file xoperation.hpp.

◆ operator+() [2/2]

template<class E1 , class E2 >
auto xt::operator+ ( E1 && e1,
E2 && e2 ) -> detail::xfunction_type_t<detail::plus, E1, E2>
inlinenoexcept

Addition.

Returns an xfunction for the element-wise addition of e1 and e2.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
an xfunction

Definition at line 264 of file xoperation.hpp.

◆ operator-() [1/2]

template<class E >
auto xt::operator- ( E && e) -> detail::xfunction_type_t<detail::negate, E>
inlinenoexcept

Opposite.

Returns an xfunction for the element-wise opposite of e.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 248 of file xoperation.hpp.

◆ operator-() [2/2]

template<class E1 , class E2 >
auto xt::operator- ( E1 && e1,
E2 && e2 ) -> detail::xfunction_type_t<detail::minus, E1, E2>
inlinenoexcept

Substraction.

Returns an xfunction for the element-wise substraction of e2 to e1.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
an xfunction

Definition at line 280 of file xoperation.hpp.

◆ operator/()

template<class E1 , class E2 >
auto xt::operator/ ( E1 && e1,
E2 && e2 ) -> detail::xfunction_type_t<detail::divides, E1, E2>
inlinenoexcept

Division.

Returns an xfunction for the element-wise division of e1 by e2.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
an xfunction

Definition at line 312 of file xoperation.hpp.