1 #ifndef SJTXPMDBEYHNPQSGKFIEKTKOYWOFMOEGAHNOHMJVHJIAWTBHCCFUKCHLJMJAFPRHRXEOTYEDC
2 #define SJTXPMDBEYHNPQSGKFIEKTKOYWOFMOEGAHNOHMJVHJIAWTBHCCFUKCHLJMJAFPRHRXEOTYEDC
9 template< Expression Real_Ex, Expression Imag_Ex >
17 template<
typename T >
20 template< Expression Real_Ex, Expression Imag_Ex >
23 template<
typename T >
30 template<
typename T >
38 template< Expression Real_Ex, Expression Imag_Ex >
48 template< Expression Real_Ex, Expression Imag_Ex >
67 auto abs( C
const& c ) noexcept
85 auto norm( C
const& c ) noexcept
87 auto const& r =
real( c );
88 auto const& i =
imag( c );
104 template< Complex C >
105 auto conj( C
const& c ) noexcept
122 template< Expression Em, Expression Ep >
123 auto polar( Em
const& em, Ep
const& ep ) noexcept
143 template< Complex C >
144 auto arg( C
const& c ) noexcept
153 template< Complex C >
162 template< Complex C >
172 template< Complex Cl, Complex Cr >
182 template< Complex Cl, Complex Cr >
199 template< Complex Cl, Complex Cr >
202 auto const& a =
real(cl);
203 auto const& b =
imag(cl);
204 auto const& c =
real(cr);
205 auto const& d =
imag(cr);
206 auto const& ac = a * c;
207 auto const& bd = b * d;
208 auto const& a_b = a + b;
209 auto const& c_d = c + d;
210 auto const& abcd = a_b * c_d;
212 return complex{ ac-bd, abcd-ac-bd };
220 template< Complex C, Expression E >
229 template< Complex C, Expression E >
239 template< Complex C, Expression E >
248 template< Complex C, Expression E >
257 template< Complex C, Expression E >
266 template< Complex C, Expression E >
Definition: activation.hpp:12
Imag_Ex imag(complex< Real_Ex, Imag_Ex > const &c) noexcept
Definition: complex_operator.hpp:49
constexpr bool is_complex_v
Definition: complex_operator.hpp:24
auto norm(C const &c) noexcept
Returns the squared magnitude of the complex expression.
Definition: complex_operator.hpp:85
concept Complex
A type that represents a complex expression.
Definition: complex_operator.hpp:31
Real_Ex real(complex< Real_Ex, Imag_Ex > const &c) noexcept
Definition: complex_operator.hpp:39
auto operator+(C const &c) noexcept
Returns the complex expression.
Definition: complex_operator.hpp:154
auto abs(C const &c) noexcept
Returns the magnitude of the complex expression.
Definition: complex_operator.hpp:67
constexpr auto negative(Ex const &ex) noexcept
Definition: operation.hpp:389
auto operator-(C const &c) noexcept
Negatives the complex expression.
Definition: complex_operator.hpp:163
auto conj(C const &c) noexcept
Returns the conjugate of the complex expression.
Definition: complex_operator.hpp:105
auto polar(Em const &em, Ep const &ep) noexcept
Returns with given magnitude and phase angle.
Definition: complex_operator.hpp:123
constexpr auto hadamard_product(Lhs_Expression const &lhs_ex, Rhs_Expression const &rhs_ex) noexcept
Definition: operation.hpp:444
auto arg(C const &c) noexcept
Calculates the phase angle (in radians) of the complex expression.
Definition: complex_operator.hpp:144
auto operator*(Cl const &cl, Cr const &cr) noexcept
Multiplies two complex expressions. Optimization here: (a+ib)*(c+id) = (ac-bd) + i(ad+bc) = (ac-bd) +...
Definition: complex_operator.hpp:200
constexpr auto sin(Ex const &ex) noexcept
Computes Sin of the given expression.
Definition: operation.hpp:3583
*endcode **constexpr auto hypot(Ex const &ex, Ey const &ey) noexcept
Definition: operation.hpp:632
constexpr auto atan2(Lhs_Expression const &lhs_ex, Rhs_Expression const &rhs_ex) noexcept
Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.
Definition: operation.hpp:1672
constexpr auto cos(Ex const &ex) noexcept
Computes Cos of the given expression.
Definition: operation.hpp:2777
Definition: complex_operator.hpp:11
Imag_Ex imag_
Definition: complex_operator.hpp:13
Real_Ex real_
Definition: complex_operator.hpp:12
Definition: complex_operator.hpp:18