#include <VecMat.h>
Public Member Functions | |
| Matrix () | |
| Constructor. | |
| Matrix (unsigned int rows, unsigned int cols, bool zero=false) | |
| Constructor. | |
| Matrix (const Array< double > &other) | |
| Copy constructor (deep copy). | |
| Matrix (const Matrix &other) | |
| Copy constructor (deep copy). | |
| ~Matrix () | |
| Destructor. | |
| void | operator= (double value) |
| set all entries to the same value | |
| Matrix | transpose () const |
| Returns the transpose of the matrix. | |
| Matrix | inverse (unsigned maxIterations=200, double tolerance=1e-10, bool ignoreThreshold=true) const |
| Compute the generalized Moore-Penrose inverse of the matrix using SVD. | |
| Matrix | inverseSymm () const |
| Compute the inverse of the matrix. | |
| Matrix | inverseSymmPositiveDefinite () const |
| Compute the inverse of a symmetric positive definite matrix. | |
| Matrix | inverseCholesky (double thresholdFactor=1e-9) const |
| Returns the generalized inverse matrix of input matrix using Cholesky decomposition. | |
| Matrix | inverseMoorePenrose () const |
| Returns the generalized inverse matrix of input matrix assuming that the matrix has full rank. | |
| void | svd (Matrix &U, Matrix &V, Vector &lambda, unsigned int maxIterations=200, bool ignoreThreshold=false) const |
| Compute the Singular Value Decomposition. | |
| void | eigensymm (Matrix &eigenvectors, Vector &eigenvalues) const |
| Compute eigenvectors and eigenvalues. | |
| void | eigenvalues (Vector &real, Vector *imaginary=NULL) const |
| Compute real and imaginary parts of the eigenvalues. | |
| double | detSymm () const |
| Computes the determinant of the matrix. | |
| double | logDetSymm () const |
| Computes the determinant of the matrix. | |
| double | trace () const |
| Computes the trace of the matrix. | |
| bool | isSquare () const |
| Checks whether the matrix is a square matrix. | |
| Vector | row (unsigned int r) const |
| Returns a row vector of the matrix (deep copy). | |
| Vector | col (unsigned int c) const |
| Returns a column vector of the matrix (deep copy). | |
| Vector | operator[] (unsigned int i) |
| Returns a row vector of the matrix. | |
| const Vector | operator[] (unsigned int i) const |
| Returns a const row vector of the matrix. | |
| ArrayBase * | clone () const |
| Clone the matrix (deep copy). | |
| ArrayBase * | cloneEmpty () const |
| Clone the class of the matrix. | |
Static Public Member Functions | |
| static Matrix | unitmatrix (unsigned int dim) |
| Returns a matrix object filled with the unit matrix of the given dimensionality. | |
| static Matrix | diagonal (const Array< double > &diag) |
| Returns the diagonal matrix built from the given vector. | |
Protected Member Functions | |
| void | resize_i (unsigned int *d, unsigned int nd, bool copy) |
| inherited internal resize interface | |
Friends | |
| class | Vector |
Definition at line 133 of file VecMat.h.
| Matrix::Matrix | ( | ) |
| Matrix::Matrix | ( | unsigned int | rows, | |
| unsigned int | cols, | |||
| bool | zero = false | |||
| ) |
| Matrix::Matrix | ( | const Array< double > & | other | ) |
| Matrix::Matrix | ( | const Matrix & | other | ) |
| Matrix::~Matrix | ( | ) |
| ArrayBase * Matrix::clone | ( | ) | const |
Clone the matrix (deep copy).
Definition at line 311 of file VecMat.cpp.
References Matrix().
| ArrayBase * Matrix::cloneEmpty | ( | ) | const |
Clone the class of the matrix.
Definition at line 316 of file VecMat.cpp.
References Matrix().
| Vector Matrix::col | ( | unsigned int | c | ) | const |
| double Matrix::detSymm | ( | ) | const |
Computes the determinant of the matrix.
For non-symmetric matrices the result is undefined.
Definition at line 259 of file VecMat.cpp.
References detsymm().
| Matrix Matrix::diagonal | ( | const Array< double > & | diag | ) | [static] |
Compute eigenvectors and eigenvalues.
For non-symmetric matrices the result is undefined.
Definition at line 235 of file VecMat.cpp.
Compute real and imaginary parts of the eigenvalues.
Definition at line 242 of file VecMat.cpp.
References eigen().
| Matrix Matrix::inverse | ( | unsigned | maxIterations = 200, |
|
| double | tolerance = 1e-10, |
|||
| bool | ignoreThreshold = true | |||
| ) | const |
Compute the generalized Moore-Penrose inverse of the matrix using SVD.
Definition at line 190 of file VecMat.cpp.
References g_inverse().
| Matrix Matrix::inverseCholesky | ( | double | thresholdFactor = 1e-9 |
) | const |
Returns the generalized inverse matrix of input matrix using Cholesky decomposition.
Definition at line 198 of file VecMat.cpp.
References g_inverseCholesky().
| Matrix Matrix::inverseMoorePenrose | ( | ) | const |
Returns the generalized inverse matrix of input matrix assuming that the matrix has full rank.
Definition at line 206 of file VecMat.cpp.
References g_inverseMoorePenrose().
| Matrix Matrix::inverseSymm | ( | ) | const |
Compute the inverse of the matrix.
For non-symmetric matrices the result is undefined.
Definition at line 214 of file VecMat.cpp.
References invertSymm().
| Matrix Matrix::inverseSymmPositiveDefinite | ( | ) | const |
Compute the inverse of a symmetric positive definite matrix.
Definition at line 222 of file VecMat.cpp.
References invertSymmPositiveDefinite().
| bool Matrix::isSquare | ( | ) | const [inline] |
Checks whether the matrix is a square matrix.
Definition at line 207 of file VecMat.h.
Referenced by powerseries(), and trace().
| double Matrix::logDetSymm | ( | ) | const |
Computes the determinant of the matrix.
For non-symmetric or non-positive definite matrices the result is undefined.
Definition at line 269 of file VecMat.cpp.
References logdetsymm().
| void Matrix::operator= | ( | double | value | ) | [inline] |
| const Vector Matrix::operator[] | ( | unsigned int | i | ) | const [inline] |
| Vector Matrix::operator[] | ( | unsigned int | i | ) | [inline] |
| void Matrix::resize_i | ( | unsigned int * | d, | |
| unsigned int | nd, | |||
| bool | copy | |||
| ) | [protected] |
| Vector Matrix::row | ( | unsigned int | r | ) | const |
Returns a row vector of the matrix (deep copy).
Definition at line 289 of file VecMat.cpp.
Referenced by operator[]().
| double Matrix::trace | ( | ) | const |
| Matrix Matrix::transpose | ( | ) | const |
| Matrix Matrix::unitmatrix | ( | unsigned int | dim | ) | [static] |
Returns a matrix object filled with the unit matrix of the given dimensionality.
Definition at line 163 of file VecMat.cpp.
Referenced by powerseries().
friend class Vector [friend] |