#include <complex.h>
Public Member Functions | |
Complex (void) | |
Complex (const Complex< T > &c) | |
template<typename Tr, typename Ti> | |
Complex (const Tr re, const Ti im=0) | |
~Complex () | |
T & | real () |
T & | imag () |
const T & | real () const |
const T & | imag () const |
seal::Complex< T >::Complex | ( | void | ) | [inline] |
Default constructor. The real and imaginary parts are initialised to unknown values.
seal::Complex< T >::Complex | ( | const Complex< T > & | c | ) | [inline] |
Copy constructor.
seal::Complex< T >::Complex | ( | const Tr | re, | |
const Ti | im = 0 | |||
) | [inline] |
The constructor which initialises the real and imaginary parts as desired by the client.
re | The desired real part | |
im | The desired imaginary part |
seal::Complex< T >::~Complex | ( | ) | [inline] |
Destructor.
T& seal::Complex< T >::real | ( | ) | [inline] |
Returns a reference to the real part of the complex number. Hence, this function can be used as an lvalue.
T& seal::Complex< T >::imag | ( | ) | [inline] |
Returns a reference to the imaginary part of the complex number. Hence, this function can be used as an lvalue.
const T& seal::Complex< T >::real | ( | ) | const [inline] |
Returns a constant reference to the real part of the complex number.
const T& seal::Complex< T >::imag | ( | ) | const [inline] |
Returns a constant reference to the imaginary part of the complex number.