cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
equal.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_EQUAL_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_EQUAL_H
5
7
8namespace pRC
9{
10 template<IsComplex TA, IsComplex TB>
11 static inline constexpr auto operator==(TA const &a, TB const &b)
12 {
13 return (a.real() == b.real()) && (a.imag() == b.imag());
14 }
15
16 template<IsComplex TA, IsValue TB>
17 static inline constexpr auto operator==(TA const &a, TB const &b)
18 {
19 return (a.real() == b) && (a.imag() == zero());
20 }
21
22 template<IsValue TA, IsComplex TB>
23 static inline constexpr auto operator==(TA const &a, TB const &b)
24 {
25 return (a == b.real()) && (zero() == b.imag());
26 }
27}
28#endif // pRC_CORE_COMPLEX_FUNCTIONS_EQUAL_H
Definition cholesky.hpp:10
static constexpr auto operator==(JacobiRotation< TA > const &a, JacobiRotation< TB > const &b)
Definition jacobi_rotation.hpp:284
static constexpr auto zero()
Definition zero.hpp:12