ParGeMSLR
|
The template class complex. More...
#include <complex.hpp>
Public Member Functions | |
ComplexValueClass () | |
The constructor of complex value class. More... | |
ComplexValueClass (T real) | |
The constructor of complex value class. More... | |
ComplexValueClass (T real, T imag) | |
The constructor of complex value class. More... | |
T & | Real () |
Get the real part. More... | |
const T & | Real () const |
Get the real part. More... | |
T & | Imag () |
Get the imag part. More... | |
const T & | Imag () const |
Get the imag part. More... | |
T | Norm () const |
Get the square of 2-norm. Note that std::complex use the this value as norm. More... | |
T | Norm2 () const |
Get the 2-norm. Note that std::complex use the square of this value as norm. More... | |
T | Abs () const |
Get the 2-norm as absolute value. More... | |
ComplexValueClass< T > | Conj () const |
Get the conjugate. More... | |
ComplexValueClass< T > & | operator= (const T &real) |
Conver to real value, only keep the real part. More... | |
ComplexValueClass< T > & | operator+= (const T &real) |
+= operator with real value. More... | |
ComplexValueClass< T > & | operator-= (const T &real) |
-= operator with real value. More... | |
ComplexValueClass< T > & | operator*= (const T &real) |
*= operator with real value. More... | |
ComplexValueClass< T > & | operator/= (const T &real) |
/= operator with real value. More... | |
ComplexValueClass< T > & | operator= (const ComplexValueClass< T > &val) |
= operator with real value. More... | |
ComplexValueClass< T > & | operator+= (const ComplexValueClass< T > &val) |
+= operator with real value. More... | |
ComplexValueClass< T > & | operator-= (const ComplexValueClass< T > &val) |
-= operator with real value. More... | |
ComplexValueClass< T > & | operator*= (const ComplexValueClass< T > &val) |
*= operator with real value. More... | |
ComplexValueClass< T > & | operator/= (const ComplexValueClass< T > &val) |
/= operator with real value. More... | |
The template class complex.
|
inline |
The constructor of complex value class.
|
inline |
The constructor of complex value class.
[in] | real | The real part, imag part is 0.0. |
|
inline |
The constructor of complex value class.
[in] | real | The real part. |
[in] | imag | The imag part. |
|
inline |
Get the 2-norm as absolute value.
|
inline |
Get the conjugate.
|
inline |
Get the imag part.
|
inline |
Get the imag part.
|
inline |
Get the square of 2-norm. Note that std::complex use the this value as norm.
|
inline |
Get the 2-norm. Note that std::complex use the square of this value as norm.
|
inline |
*= operator with real value.
[in] | val | The other value. |
|
inline |
*= operator with real value.
[in] | real | The real value. |
|
inline |
+= operator with real value.
[in] | val | The other value. |
|
inline |
+= operator with real value.
[in] | real | The real value. |
|
inline |
-= operator with real value.
[in] | val | The other value. |
|
inline |
-= operator with real value.
[in] | real | The real value. |
|
inline |
/= operator with real value.
[in] | val | The other value. |
|
inline |
/= operator with real value.
[in] | real | The real value. |
|
inline |
= operator with real value.
[in] | val | The other value. |
|
inline |
Conver to real value, only keep the real part.
= operator with real value.
= operator with real value.
[in] | real | The real value. |
|
inline |
Get the real part.
|
inline |
Get the real part.