![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class representing a complex number. More...
#include <mdsComplex.h>
Public Types | |
| typedef T | tComponent |
| Type of the complex number component. | |
Public Member Functions | |
| CComplex () | |
| Default constructor. | |
| CComplex (tComponent r, tComponent i) | |
| Constructor. | |
| CComplex (tComponent r) | |
| Constructor. | |
| CComplex (const std::complex< T > &z) | |
| Constructor. | |
| CComplex (const CComplex &z) | |
| Copy constructor. | |
| std::complex< T > | conv2Std () const |
| Conversion to the STL complex number. | |
| CComplex & | get (tComponent &r, tComponent &i) |
| Returns both the real and the imaginary part of the complex number. | |
| const CComplex & | get (tComponent &r, tComponent &i) const |
| tComponent | getArg () const |
| Returns argument (angle) of the complex number. | |
| CComplex | getConj () const |
| Returns complex conjugate number. | |
| tComponent & | getImag () |
| Returns imaginary part of the complex number. | |
| const tComponent & | getImag () const |
| tComponent | getMag () const |
| Returns absolute value (magnitude) of the complex number. | |
| tComponent | getNorm () const |
| Returns squared absolute value of the complex number. | |
| tComponent & | getReal () |
| Returns real part of the complex number. | |
| const tComponent & | getReal () const |
| tComponent & | im () |
| Returns imaginary part of the complex number. | |
| const tComponent & | im () const |
| CComplex & | normalize () |
| Normalizes the complex number so that the absolute value is equal to one. | |
| CComplex & | operator*= (const CComplex &z) |
| CComplex & | operator*= (const T &c) |
| CComplex & | operator+= (const CComplex &z) |
| Combined assignment operators. | |
| CComplex & | operator+= (const T &c) |
| Others combined assignment operators. | |
| CComplex & | operator-= (const CComplex &z) |
| CComplex & | operator-= (const T &c) |
| CComplex & | operator/= (const CComplex &z) |
| CComplex & | operator/= (const T &c) |
| CComplex & | operator= (const CComplex &z) |
| Assignment operator. | |
| CComplex & | operator= (const std::complex< T > &z) |
| Assignment operator. | |
| CComplex & | operator= (tComponent r) |
| Assignment operator. | |
| tComponent & | re () |
| Returns real part of the complex number. | |
| const tComponent & | re () const |
| CComplex & | set (tComponent r, tComponent i) |
| Sets real and imaginary part of the complex number. | |
| CComplex & | setImag (tComponent i) |
| Sets imaginary part of the complex number. | |
| CComplex & | setReal (tComponent r) |
| Sets real part of the complex number. | |
| ~CComplex () | |
| Destructor. | |
Protected Attributes | |
| T | m_im |
| T | m_re |
| Real and imaginary part of the complex number. | |
Class representing a complex number.
| typedef T mds::math::CComplex< T >::tComponent |
Type of the complex number component.
| mds::math::CComplex< T >::CComplex | ( | ) |
Default constructor.
| mds::math::CComplex< T >::CComplex | ( | tComponent | r, |
| tComponent | i | ||
| ) |
Constructor.
| mds::math::CComplex< T >::CComplex | ( | tComponent | r | ) | [explicit] |
Constructor.
| mds::math::CComplex< T >::CComplex | ( | const std::complex< T > & | z | ) | [explicit] |
Constructor.
| mds::math::CComplex< T >::~CComplex | ( | ) |
Destructor.
| mds::math::CComplex< T >::CComplex | ( | const CComplex< T > & | z | ) |
Copy constructor.
| std::complex<T> mds::math::CComplex< T >::conv2Std | ( | ) | const |
Conversion to the STL complex number.
| CComplex& mds::math::CComplex< T >::get | ( | tComponent & | r, |
| tComponent & | i | ||
| ) |
Returns both the real and the imaginary part of the complex number.
| const CComplex& mds::math::CComplex< T >::get | ( | tComponent & | r, |
| tComponent & | i | ||
| ) | const |
| tComponent mds::math::CComplex< T >::getArg | ( | ) | const |
Returns argument (angle) of the complex number.
| CComplex mds::math::CComplex< T >::getConj | ( | ) | const |
Returns complex conjugate number.
| tComponent& mds::math::CComplex< T >::getImag | ( | ) |
Returns imaginary part of the complex number.
| const tComponent& mds::math::CComplex< T >::getImag | ( | ) | const |
| tComponent mds::math::CComplex< T >::getMag | ( | ) | const |
Returns absolute value (magnitude) of the complex number.
| tComponent mds::math::CComplex< T >::getNorm | ( | ) | const |
Returns squared absolute value of the complex number.
| tComponent& mds::math::CComplex< T >::getReal | ( | ) |
Returns real part of the complex number.
| const tComponent& mds::math::CComplex< T >::getReal | ( | ) | const |
| tComponent& mds::math::CComplex< T >::im | ( | ) |
Returns imaginary part of the complex number.
| const tComponent& mds::math::CComplex< T >::im | ( | ) | const |
| CComplex& mds::math::CComplex< T >::normalize | ( | ) |
Normalizes the complex number so that the absolute value is equal to one.
| CComplex< T > & mds::math::CComplex< T >::operator*= | ( | const CComplex< T > & | z | ) |
| CComplex< T > & mds::math::CComplex< T >::operator*= | ( | const T & | c | ) |
| CComplex< T > & mds::math::CComplex< T >::operator+= | ( | const CComplex< T > & | z | ) |
Combined assignment operators.
| CComplex< T > & mds::math::CComplex< T >::operator+= | ( | const T & | c | ) |
Others combined assignment operators.
| CComplex< T > & mds::math::CComplex< T >::operator-= | ( | const CComplex< T > & | z | ) |
| CComplex< T > & mds::math::CComplex< T >::operator-= | ( | const T & | c | ) |
| CComplex< T > & mds::math::CComplex< T >::operator/= | ( | const CComplex< T > & | z | ) |
| CComplex< T > & mds::math::CComplex< T >::operator/= | ( | const T & | c | ) |
| CComplex& mds::math::CComplex< T >::operator= | ( | const CComplex< T > & | z | ) |
Assignment operator.
| CComplex& mds::math::CComplex< T >::operator= | ( | const std::complex< T > & | z | ) |
Assignment operator.
| CComplex& mds::math::CComplex< T >::operator= | ( | tComponent | r | ) |
Assignment operator.
| tComponent& mds::math::CComplex< T >::re | ( | ) |
Returns real part of the complex number.
| const tComponent& mds::math::CComplex< T >::re | ( | ) | const |
| CComplex& mds::math::CComplex< T >::set | ( | tComponent | r, |
| tComponent | i | ||
| ) |
Sets real and imaginary part of the complex number.
| CComplex& mds::math::CComplex< T >::setImag | ( | tComponent | i | ) |
Sets imaginary part of the complex number.
| CComplex& mds::math::CComplex< T >::setReal | ( | tComponent | r | ) |
Sets real part of the complex number.
T mds::math::CComplex< T >::m_im [protected] |
T mds::math::CComplex< T >::m_re [protected] |
Real and imaginary part of the complex number.
1.7.6.1