|
PARTONS/NumA++
|
Numerical Analysis C++ routines
|
![]() |
Matrix of complex numbers of undefined size. More...
Public Types | |
| enum | Dim { X = 1 , Y = 2 } |
| Dimension index. More... | |
Public Member Functions | |
| MatrixComplexD () | |
| Default constructor. More... | |
| MatrixComplexD (const unsigned int n, const unsigned int m) | |
| Assignemnt constructor. More... | |
| MatrixComplexD (const MatrixComplexD &v) | |
| Copy constructor. More... | |
| virtual | ~MatrixComplexD () |
| Destructor. More... | |
| MatrixComplexD | Conjunct () const |
| Get conjunction of matrix. More... | |
| MatrixComplexD | Mult (const MatrixComplexD &v) const |
| Multiply this with other matrix. More... | |
| void | Clear () |
Clear vector (set std::complex<double>(0., 0.) to all elements). More... | |
| void | MakeUnit () |
Make unit (set std::complex<double>(1., 0.) to diagonal elements). More... | |
| void | operator= (const MatrixComplexD &rhs) |
| Operator =. More... | |
| MatrixComplexD | operator+ (const MatrixComplexD &rhs) |
| Operator +. More... | |
| MatrixComplexD | operator- (const MatrixComplexD &rhs) |
| Operator -. More... | |
| MatrixComplexD | operator* (const double &rhs) |
| Operator * by real number (rhs). More... | |
| MatrixComplexD | operator* (const std::complex< double > &rhs) |
| Operator * by complex number (rhs). More... | |
| unsigned int | GetNElements (const Dim v) const |
| Get dim. More... | |
| void | SetElement (const unsigned int i, const unsigned int j, const std::complex< double > value) |
| Set element. More... | |
| std::complex< double > | GetElement (const unsigned int i, const unsigned int j) const |
| Get element. More... | |
Private Member Functions | |
| void | CompareNElements (const MatrixComplexD &v) const |
| Compare number of elements of this and other vector. More... | |
Private Attributes | |
| unsigned int | m_n |
| Size of x dim. More... | |
| unsigned int | m_m |
| Size of y dim. More... | |
| std::vector< std::vector< std::complex< double > > > | m_elements |
| Elements. More... | |
Friends | |
| MatrixComplexD | operator* (const double &lhs, MatrixComplexD &rhs) |
| Operator * by real number (lhs). More... | |
| MatrixComplexD | operator* (const std::complex< double > &lhs, MatrixComplexD &rhs) |
| Operator * by complex number (lhs). More... | |
Matrix of complex numbers of undefined size.
This class represents a matrix of complex double precision numbers. The size of this matrix should be defined by the user.
| NumA::MatrixComplexD::MatrixComplexD | ( | ) |
Default constructor.
| NumA::MatrixComplexD::MatrixComplexD | ( | const unsigned int | n, |
| const unsigned int | m | ||
| ) |
Assignemnt constructor.
Elements will be initialized with std::complex<double>(0., 0.).
| n | Size of x dim. to be set. |
| m | Size of y dim. to be set. |
| NumA::MatrixComplexD::MatrixComplexD | ( | const MatrixComplexD & | v | ) |
Copy constructor.
| v | Object to be copied. |
|
virtual |
Destructor.
| void NumA::MatrixComplexD::Clear | ( | ) |
Clear vector (set std::complex<double>(0., 0.) to all elements).
|
private |
Compare number of elements of this and other vector.
| v | Other matrix. |
| MatrixComplexD NumA::MatrixComplexD::Conjunct | ( | ) | const |
Get conjunction of matrix.
Return: \(M^{*}\).
| std::complex< double > NumA::MatrixComplexD::GetElement | ( | const unsigned int | i, |
| const unsigned int | j | ||
| ) | const |
Get element.
| i | Index of x element to be retrieved. |
| j | Index of y element to be retrieved. |
| unsigned int NumA::MatrixComplexD::GetNElements | ( | const Dim | v | ) | const |
Get dim.
size for given dimension.
| v | Dimension. |
| void NumA::MatrixComplexD::MakeUnit | ( | ) |
Make unit (set std::complex<double>(1., 0.) to diagonal elements).
| MatrixComplexD NumA::MatrixComplexD::Mult | ( | const MatrixComplexD & | v | ) | const |
Multiply this with other matrix.
Return: \(M N\).
| v | Other matrix, |
| MatrixComplexD NumA::MatrixComplexD::operator* | ( | const double & | rhs | ) |
Operator * by real number (rhs).
| MatrixComplexD NumA::MatrixComplexD::operator* | ( | const std::complex< double > & | rhs | ) |
Operator * by complex number (rhs).
| MatrixComplexD NumA::MatrixComplexD::operator+ | ( | const MatrixComplexD & | rhs | ) |
Operator +.
| MatrixComplexD NumA::MatrixComplexD::operator- | ( | const MatrixComplexD & | rhs | ) |
Operator -.
| void NumA::MatrixComplexD::operator= | ( | const MatrixComplexD & | rhs | ) |
Operator =.
| void NumA::MatrixComplexD::SetElement | ( | const unsigned int | i, |
| const unsigned int | j, | ||
| const std::complex< double > | value | ||
| ) |
Set element.
| i | Index of x element to be set. |
| j | Index of y element to be set. |
| value | Value to be set. |
|
friend |
Operator * by real number (lhs).
|
friend |
Operator * by complex number (lhs).
|
private |
Elements.
|
private |
Size of y dim.
|
private |
Size of x dim.