#include <IDIL_Utils.h>
Public Member Functions | |
complex (T r) | |
Construct a complex number equal to r+i*0. | |
complex (T r, T i) | |
Construct a complex number. | |
template<typename T2> | |
complex< T > & | operator= (const T2 &e) |
Affectation. | |
template<typename T2> | |
complex< T > & | operator= (complex< T2 > c) |
Affectation. | |
template<typename T2> | |
complex< T > & | operator+= (complex< T2 > &c) |
Add a complex number. | |
complex< T > & | operator+= (const T &e) |
Add a real number. | |
template<typename T2> | |
complex< T > & | operator-= (complex< T2 > &c) |
Substract a complex number. | |
complex< T > & | operator-= (const T &e) |
Substract a real number. | |
template<typename T2> | |
complex< T > & | operator*= (complex< T2 > &c) |
Multiply by a complex number. | |
complex< T > & | operator*= (const T &e) |
Multiply by a real number. | |
template<typename T2> | |
complex< T > & | operator/= (complex< T2 > &c) |
Divide by a complex number. | |
complex< T > & | operator/= (const T &e) |
Divide by a real number. | |
Public Attributes | |
T | rl |
Real part. | |
T | im |
Imaginary part. |
The class complex implements complex number arithmetic. Complex number might be composed of any numeric type.