xtensor
Loading...
Searching...
No Matches
Comparison operators

Functions

template<class E1 , class E2 >
auto xt::operator< (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::less, E1, E2 >
 Lesser than.
 
template<class E1 , class E2 >
auto xt::operator<= (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::less_equal, E1, E2 >
 Lesser or equal.
 
template<class E1 , class E2 >
auto xt::operator> (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::greater, E1, E2 >
 Greater than.
 
template<class E1 , class E2 >
auto xt::operator>= (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::greater_equal, E1, E2 >
 Greater or equal.
 
template<class E1 , class E2 >
std::enable_if_t< xoptional_comparable< E1, E2 >::value, boolxt::operator== (const xexpression< E1 > &e1, const xexpression< E2 > &e2)
 Equality.
 
template<class E1 , class E2 >
bool xt::operator!= (const xexpression< E1 > &e1, const xexpression< E2 > &e2)
 Inequality.
 
template<class E1 , class E2 >
auto xt::equal (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::equal_to, E1, E2 >
 Element-wise equality.
 
template<class E1 , class E2 >
auto xt::not_equal (E1 &&e1, E2 &&e2) noexcept -> detail::xfunction_type_t< detail::not_equal_to, E1, E2 >
 Element-wise inequality.
 
template<class E1 , class E2 >
auto xt::less (E1 &&e1, E2 &&e2) noexcept -> decltype(std::forward< E1 >(e1)< std::forward< E2 >(e2))
 Lesser than.
 
template<class E1 , class E2 >
auto xt::less_equal (E1 &&e1, E2 &&e2) noexcept -> decltype(std::forward< E1 >(e1)<=std::forward< E2 >(e2))
 Lesser or equal.
 
template<class E1 , class E2 >
auto xt::greater (E1 &&e1, E2 &&e2) noexcept -> decltype(std::forward< E1 >(e1) > std::forward< E2 >(e2))
 Greater than.
 
template<class E1 , class E2 >
auto xt::greater_equal (E1 &&e1, E2 &&e2) noexcept -> decltype(std::forward< E1 >(e1) >=std::forward< E2 >(e2))
 Greater or equal.
 

Detailed Description

Function Documentation

◆ equal()

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

Element-wise equality.

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

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

Definition at line 674 of file xoperation.hpp.

◆ greater()

template<class E1 , class E2 >
auto xt::greater ( E1 && e1,
E2 && e2 ) -> decltype(std::forward<E1>(e1) > std::forward<E2>(e2))
inlinenoexcept

Greater than.

Returns an xfunction for the element-wise greater than comparison of e1 and e2. This function is equivalent to operator>(E1&&, E2&&).

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

Definition at line 741 of file xoperation.hpp.

◆ greater_equal()

template<class E1 , class E2 >
auto xt::greater_equal ( E1 && e1,
E2 && e2 ) -> decltype(std::forward<E1>(e1) >= std::forward<E2>(e2))
inlinenoexcept

Greater or equal.

Returns an xfunction for the element-wise greater or equal comparison of e1 and e2. This function is equivalent to operator>=(E1&&, E2&&).

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

Definition at line 758 of file xoperation.hpp.

◆ less()

template<class E1 , class E2 >
auto xt::less ( E1 && e1,
E2 && e2 ) -> decltype(std::forward<E1>(e1) < std::forward<E2>(e2))
inlinenoexcept

Lesser than.

Returns an xfunction for the element-wise lesser than comparison of e1 and e2. This function is equivalent to operator<(E1&&, E2&&).

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

Definition at line 707 of file xoperation.hpp.

◆ less_equal()

template<class E1 , class E2 >
auto xt::less_equal ( E1 && e1,
E2 && e2 ) -> decltype(std::forward<E1>(e1) <= std::forward<E2>(e2))
inlinenoexcept

Lesser or equal.

Returns an xfunction for the element-wise lesser or equal comparison of e1 and e2. This function is equivalent to operator<=(E1&&, E2&&).

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

Definition at line 724 of file xoperation.hpp.

◆ not_equal()

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

Element-wise inequality.

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

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

Definition at line 690 of file xoperation.hpp.

◆ operator!=()

template<class E1 , class E2 >
bool xt::operator!= ( const xexpression< E1 > & e1,
const xexpression< E2 > & e2 )
inline

Inequality.

Returns true if e1 and e2 have different shapes or hold the different values. Unlike other comparison operators, this does not return an xfunction.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
a boolean

Definition at line 658 of file xoperation.hpp.

◆ operator<()

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

Lesser than.

Returns an xfunction for the element-wise lesser than comparison of e1 and e2.

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

Definition at line 563 of file xoperation.hpp.

◆ operator<=()

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

Lesser or equal.

Returns an xfunction for the element-wise lesser or equal comparison of e1 and e2.

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

Definition at line 579 of file xoperation.hpp.

◆ operator==()

template<class E1 , class E2 >
std::enable_if_t< xoptional_comparable< E1, E2 >::value, bool > xt::operator== ( const xexpression< E1 > & e1,
const xexpression< E2 > & e2 )
inline

Equality.

Returns true if e1 and e2 have the same shape and hold the same values. Unlike other comparison operators, this does not return an xfunction.

Parameters
e1an xexpression or a scalar
e2an xexpression or a scalar
Returns
a boolean

Definition at line 630 of file xoperation.hpp.

◆ operator>()

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

Greater than.

Returns an xfunction for the element-wise greater than comparison of e1 and e2.

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

Definition at line 595 of file xoperation.hpp.

◆ operator>=()

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

Greater or equal.

Returns an xfunction for the element-wise greater or equal comparison of e1 and e2.

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

Definition at line 611 of file xoperation.hpp.