ceras
yet another deep learning engine
Classes | Namespaces | Functions | Variables
complex_operator.hpp File Reference
#include "./operation.hpp"

Go to the source code of this file.

Classes

struct  ceras::complex< Real_Ex, Imag_Ex >
 
struct  ceras::is_complex< T >
 
struct  ceras::is_complex< complex< Real_Ex, Imag_Ex > >
 

Namespaces

 ceras
 

Functions

template<Expression Real_Ex, Expression Imag_Ex>
Real_Ex ceras::real (complex< Real_Ex, Imag_Ex > const &c) noexcept
 
template<Expression Real_Ex, Expression Imag_Ex>
Imag_Ex ceras::imag (complex< Real_Ex, Imag_Ex > const &c) noexcept
 
template<Complex C>
auto ceras::abs (C const &c) noexcept
 Returns the magnitude of the complex expression. More...
 
template<Complex C>
auto ceras::norm (C const &c) noexcept
 Returns the squared magnitude of the complex expression. More...
 
template<Complex C>
auto ceras::conj (C const &c) noexcept
 Returns the conjugate of the complex expression. More...
 
template<Expression Em, Expression Ep>
auto ceras::polar (Em const &em, Ep const &ep) noexcept
 Returns with given magnitude and phase angle. More...
 
template<Complex C>
auto ceras::arg (C const &c) noexcept
 Calculates the phase angle (in radians) of the complex expression. More...
 
template<Complex C>
auto ceras::operator+ (C const &c) noexcept
 Returns the complex expression. More...
 
template<Complex C>
auto ceras::operator- (C const &c) noexcept
 Negatives the complex expression. More...
 
template<Complex Cl, Complex Cr>
auto ceras::operator+ (Cl const &cl, Cr const &cr) noexcept
 Sums up two complex expressions. More...
 
template<Complex Cl, Complex Cr>
auto ceras::operator- (Cl const &cl, Cr const &cr) noexcept
 Subtracts one complex expression from the other one. More...
 
template<Complex Cl, Complex Cr>
auto ceras::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) + i( (a+b)*(c+d)-ac-bd ) More...
 
template<Complex C, Expression E>
auto ceras::operator+ (C const &c, E const &e) noexcept
 Sums up a complex expression and an expression. More...
 
template<Complex C, Expression E>
auto ceras::operator+ (E const &e, C const &c) noexcept
 Sums up a complex expression and an expression. More...
 
template<Complex C, Expression E>
auto ceras::operator- (C const &c, E const &e) noexcept
 Subtracts an expression from a compression expression. More...
 
template<Complex C, Expression E>
auto ceras::operator- (E const &e, C const &c) noexcept
 Subtractsa complex expression from an expression. More...
 
template<Complex C, Expression E>
auto ceras::operator* (C const &c, E const &e) noexcept
 Multiplies a complex expression with an expression. More...
 
template<Complex C, Expression E>
auto ceras::operator* (E const &e, C const &c) noexcept
 Multiplies an expression with a compression expression. More...
 

Variables

template<typename T >
constexpr bool ceras::is_complex_v = is_complex<T>::value
 
template<typename T >
concept ceras::Complex = is_complex_v<T>
 A type that represents a complex expression. More...