cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
not_equal.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_NOT_EQUAL_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_NOT_EQUAL_H
5
8
9namespace pRC
10{
11 template<class TA, class TB, If<IsInvocable<NotEqual, TA, TB>> = 0>
12 static inline constexpr auto operator!=(Complex<TA> const &a,
13 Complex<TB> const &b)
14 {
15 return (a.real() != b.real()) || (a.imag() != b.imag());
16 }
17
18 template<class TA, class TB, If<IsValue<TB>> = 0,
19 If<IsInvocable<NotEqual, TA, TB>> = 0>
20 static inline constexpr auto operator!=(Complex<TA> const &a, TB const &b)
21 {
22 return (a.real() != b) || (a.imag() != zero());
23 }
24
25 template<class TA, class TB, If<IsValue<TA>> = 0,
26 If<IsInvocable<NotEqual, TA, TB>> = 0>
27 static inline constexpr auto operator!=(TA const &a, Complex<TB> const &b)
28 {
29 return (a != b.real()) || (zero() != b.imag());
30 }
31}
32#endif // pRC_CORE_COMPLEX_FUNCTIONS_NOT_EQUAL_H
Definition complex.hpp:26
constexpr decltype(auto) real() &&
Definition complex.hpp:125
constexpr decltype(auto) imag() &&
Definition complex.hpp:145
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
static constexpr auto zero()
Definition zero.hpp:12
static constexpr auto operator!=(JacobiRotation< TA > const &a, JacobiRotation< TB > const &b)
Definition jacobi_rotation.hpp:304