#include <xmatrix.hpp>
Public Types | |
typedef Matrix::Base | Base |
Public Member Functions | |
XMatrix | AutoSpectrum (const Matrix::TScalar &dt, const Matrix::TIndex &m, const Matrix::TScalar &dom) const |
XMatrix | AutoSpectrum (const Matrix::TScalar &dt, const Matrix::TScalar &dom) const |
void | CBDraw (const std::string &file, const Matrix::TIndex &width, const Matrix::TIndex &height, const std::string &xaxis="$x$-Axis", const std::string &yaxis="$y$-Axis") const |
XMatrix | CDF () const |
XMatrix | Cholesky () const |
void | Cluster (const Matrix::TScalar &distance, XMatrix &index, XMatrix ¢ers) const |
void | Cluster (const Matrix::TScalar &distance, XMatrix **index, XMatrix **centers) const |
void | Cluster (const Matrix::TScalar &tol, const Matrix &scale, XMatrix &eval, XMatrix &evec) const |
void | Cluster (const Matrix::TScalar &tol, const Matrix &scale, XMatrix **eval, XMatrix **evec) const |
XMatrixColWise | ColWise () |
XMatrix | Correlation (const Matrix &ar) const |
XMatrix | Correlation () const |
returns the correlation matrix of the parent array | |
XMatrix | Covariance (const Matrix &ar) const |
XMatrix | Covariance () const |
returns the covariance matrix of the parent array. | |
XMatrix | CrossSpectrum (const Matrix &ar2, const Matrix::TScalar &dt, const Matrix::TIndex &m, const Matrix::TScalar &dom) const |
XMatrix | CrossSpectrum (const Matrix &ar2, const Matrix::TScalar &dt, const Matrix::TScalar &dom) const |
XMatrixCWise | CWise () |
XMatrixEigen | Eigen () |
void | EigenInPlace (XMatrix &evalr, XMatrix &evali, XMatrix &evec) const |
void | EigenInPlace (XMatrix **evalr, XMatrix **evali, XMatrix **evec) const |
void | EigenLower (XMatrix &eval, XMatrix &evec) const |
void | EigenLower (XMatrix **eval, XMatrix **evec) const |
void | EigenLowerGeneral (const Matrix &mass, XMatrix &eval, XMatrix &evec) const |
void | EigenLowerGeneral (const Matrix &mass, XMatrix **eval, XMatrix **evec) const |
XMatrixEigenSym | EigenSym (const XMatrix &mass, bool computeeigenvectors=true) |
XMatrixEigenSym | EigenSym (bool computeeigenvectors=true) |
void | EigenSymInPlace (const MathArrayBase< TScalar > &mass, XMatrix **eval, XMatrix **evec) const |
void | EigenSymInPlace (XMatrix **eval, XMatrix **evec) const |
void | EigenUpper (XMatrix &eval, XMatrix &evec) const |
void | EigenUpper (XMatrix **eval, XMatrix **evec) const |
void | EigenUpperGeneral (const Matrix &mass, XMatrix &eval, XMatrix &evec) const |
void | EigenUpperGeneral (const Matrix &mass, XMatrix **eval, XMatrix **evec) const |
XMatrix | Exponential (const Matrix::TScalar &dt) const |
XMatrix | FFT (const Matrix::TScalar &dt, const Matrix::TScalar &dom) const |
XMatrix | Histogram (const Matrix::TIndex &nclasses) const |
XMatrix | IFT (const Matrix::TScalar &dt, const Matrix::TScalar &dom) const |
void | Image (const std::string &file, const Matrix::TIndex &posterize=0) const |
XMatrix | Invert () const |
XMatrix | InvertComplex () const |
XMatrix | IPhi (const Matrix::TScalar &fac=1) const |
returns the normal distribution inverse CDF of the values given by the parent array, the latter scaled by the factor fac | |
XMatrix | Kendall () const |
XMatrix | Kurtosis () const |
returns the curtosis of the parent array. | |
XMatrixLDLT | LDLT () |
XMatrixLLT | LLT () |
XMatrixLU | LU () |
XMatrix | Mean (const Matrix &ar) const |
XMatrix | Mean () const |
returns the mean of the parent array | |
XMatrix & | operator= (const MathArrayBase< TScalar > &ar) |
The assignment operator for MathArrayBase<TScalar>. | |
XMatrix | PDF (const Matrix::TIndex &nclasses=0) const |
XMatrix | Phi (const Matrix::TScalar &fac=1) const |
returns the normal distribution CDF of the values given by the parent array, the latter scaled by the factor fac | |
XMatrixQR | QR () |
XMatrix | Quantile (const Matrix::TScalar &alpha) const |
XMatrixRowWise | RowWise () |
XMatrix | Sigma (const Matrix &ar) const |
XMatrix | Sigma () const |
returns the standard deviation of the parent array. | |
XMatrix | Skewness () const |
returns the skewness of the parent array. | |
XMatrix | Solve (const Matrix &rhs) const |
XMatrixSVD | SVD () |
void | SVDInPlace (XMatrix &sval, XMatrix &u, XMatrix &v) const |
void | SVDInPlace (XMatrix **sval, XMatrix **u, XMatrix **v) const |
XMatrix | Wave (const Matrix::TIndex &mother, const Matrix::TScalar &dt, const Matrix::TIndex &jtot) const |
XMatrix | Wave (const Matrix::TIndex &mother, const Matrix::TScalar &dt) const |
calls Wave with jtot=number_of_rows/2 | |
XMatrix (const TIndex &nrow, const TIndex &ncol=1) | |
constructs a matrix and allocates nrow*ncol elements | |
template<typename OtherDerived> | |
XMatrix (const Eigen::MatrixBase< OtherDerived > &x) | |
copy constructor from Eigen objects | |
XMatrix (const XMatrix &ar) | |
copy constructor | |
XMatrix () | |
default constructor | |
virtual | ~XMatrix () |
destructor |
For most users which do not look at compatbility and efficiency, this data type is the basic choice. XMatrix extends Matrix by a lot of convenience methods from statistics, linear algebra, Fourier analyses, etc.
XMatrix has been split into 2 types due to developing reasons. Matrix does not depend on external packages (it provides simple operations), whereas XMatrix requires third-party libraries. Therefore, most TNG modules will export their data as Matrix. If the user wants to use the extended functionality he must convert it into a XMatrix.
developers note: For compatibility reasons with Matrix, all input parameters are of type 'Matrix' (then both, Matrix and XMatrix, are allowed) and all output parameters are of type 'XMatrix' (for subsequent operations)
XMatrix tngmath::XMatrix::AutoSpectrum | ( | const Matrix::TScalar & | dt, | |
const Matrix::TIndex & | m, | |||
const Matrix::TScalar & | dom | |||
) | const |
XMatrix tngmath::XMatrix::AutoSpectrum | ( | const Matrix::TScalar & | dt, | |
const Matrix::TScalar & | dom | |||
) | const [inline] |
void tngmath::XMatrix::CBDraw | ( | const std::string & | file, | |
const Matrix::TIndex & | width, | |||
const Matrix::TIndex & | height, | |||
const std::string & | xaxis = "$x$-Axis" , |
|||
const std::string & | yaxis = "$y$-Axis" | |||
) | const |
XMatrix tngmath::XMatrix::Cholesky | ( | ) | const |
returns the Cholesky decomposition of the parent matrix, i.e. the parent matrix must be real symmetric and positive definite.
void tngmath::XMatrix::Cluster | ( | const Matrix::TScalar & | distance, | |
XMatrix & | index, | |||
XMatrix & | centers | |||
) | const [inline] |
void tngmath::XMatrix::Cluster | ( | const Matrix::TScalar & | distance, | |
XMatrix ** | index, | |||
XMatrix ** | centers | |||
) | const [inline] |
void tngmath::XMatrix::Cluster | ( | const Matrix::TScalar & | tol, | |
const Matrix & | scale, | |||
XMatrix & | eval, | |||
XMatrix & | evec | |||
) | const |
void tngmath::XMatrix::Cluster | ( | const Matrix::TScalar & | tol, | |
const Matrix & | scale, | |||
XMatrix ** | eval, | |||
XMatrix ** | evec | |||
) | const [inline] |
XMatrixColWise tngmath::XMatrix::ColWise | ( | ) | [inline] |
returns the covariance matrix of the parent array weighted by a parameter.
ar |
XMatrix tngmath::XMatrix::CrossSpectrum | ( | const Matrix & | ar2, | |
const Matrix::TScalar & | dt, | |||
const Matrix::TIndex & | m, | |||
const Matrix::TScalar & | dom | |||
) | const |
XMatrix tngmath::XMatrix::CrossSpectrum | ( | const Matrix & | ar2, | |
const Matrix::TScalar & | dt, | |||
const Matrix::TScalar & | dom | |||
) | const [inline] |
XMatrixCWise tngmath::XMatrix::CWise | ( | ) | [inline] |
XMatrixEigen tngmath::XMatrix::Eigen | ( | ) |
performs an eigen analyses for the standard unsymmetric eigenvalue problem of the parent matrix. The parent array must be an upper triangular matrix. Solves the problem .
evalr | denotes the vector of real eigenvalues on return | |
evali | denotes the vector of imaginary eigenvalues on return | |
evec | denotes the matrix of eigenvectors on return |
void tngmath::XMatrix::EigenInPlace | ( | XMatrix ** | evalr, | |
XMatrix ** | evali, | |||
XMatrix ** | evec | |||
) | const [inline] |
performs an eigen analyses for the standard symmetric eigenvalue problem of the parent matrix. The parent array must be a lower triangular matrix. Solves the problem .
eval | denotes the vector of eigenvalues on return | |
evec | denotes the matrix of eigenvectors on return |
void tngmath::XMatrix::EigenLowerGeneral | ( | const Matrix & | mass, | |
XMatrix & | eval, | |||
XMatrix & | evec | |||
) | const |
performs an eigen analyses for the generalized symmetric eigenvalue problem of the parent matrix. The parent array must be a lower triangular matrix. Solves the problem .
mass | denotes the matrix | |
eval | denotes the vector of eigenvalues on return | |
evec | denotes the matrix of eigenvectors on return |
void tngmath::XMatrix::EigenLowerGeneral | ( | const Matrix & | mass, | |
XMatrix ** | eval, | |||
XMatrix ** | evec | |||
) | const [inline] |
XMatrixEigenSym tngmath::XMatrix::EigenSym | ( | const XMatrix & | mass, | |
bool | computeeigenvectors = true | |||
) |
a symmetric (upper triangular) Eigen decomposition object
a generalized symmetric Eigen decomposition object
XMatrixEigenSym tngmath::XMatrix::EigenSym | ( | bool | computeeigenvectors = true |
) |
performs an eigen analyses for the standard symmetric eigenvalue problem of the parent matrix. The parent array must be an upper triangular matrix. Solves the problem .
eval | denotes the vector of eigenvalues on return | |
evec | denotes the matrix of eigenvectors on return |
void tngmath::XMatrix::EigenUpperGeneral | ( | const Matrix & | mass, | |
XMatrix & | eval, | |||
XMatrix & | evec | |||
) | const |
performs an eigen analyses for the generalized symmetric eigenvalue problem of the parent matrix. The parent array must be an upper triangular matrix. Solves the problem .
mass | denotes the matrix | |
eval | denotes the vector of eigenvalues on return | |
evec | denotes the matrix of eigenvectors on return |
void tngmath::XMatrix::EigenUpperGeneral | ( | const Matrix & | mass, | |
XMatrix ** | eval, | |||
XMatrix ** | evec | |||
) | const [inline] |
XMatrix tngmath::XMatrix::Exponential | ( | const Matrix::TScalar & | dt | ) | const |
returns the matrix exponential of the parent matrix
dt | denotes the exponent. |
XMatrix tngmath::XMatrix::FFT | ( | const Matrix::TScalar & | dt, | |
const Matrix::TScalar & | dom | |||
) | const |
XMatrix tngmath::XMatrix::IFT | ( | const Matrix::TScalar & | dt, | |
const Matrix::TScalar & | dom | |||
) | const |
void tngmath::XMatrix::Image | ( | const std::string & | file, | |
const Matrix::TIndex & | posterize = 0 | |||
) | const |
XMatrix tngmath::XMatrix::Invert | ( | ) | const |
returns the inverse of a square parent matrix.
XMatrix tngmath::XMatrix::InvertComplex | ( | ) | const |
returns the inverse of the parent matrix if it is complex
XMatrixLDLT tngmath::XMatrix::LDLT | ( | ) |
XMatrixLLT tngmath::XMatrix::LLT | ( | ) |
XMatrixLU tngmath::XMatrix::LU | ( | ) |
returns the mean of the parent array whereby it is weighted by the given parameter.
ar | is a vector with same number of rows as the parent array. Every row of the parent array will be weighted by the corresponding item of ar divided by the elementwise sum of ar . |
XMatrixQR tngmath::XMatrix::QR | ( | ) |
XMatrixRowWise tngmath::XMatrix::RowWise | ( | ) | [inline] |
returns the standard deviation as the square root of the covariance
ar | denotes the array of which Covariance(ar) |
returns the solution of a linear system of equations with given right hand side vector. Solves where is unknown.
rhs | denotes the vector |
XMatrixSVD tngmath::XMatrix::SVD | ( | ) |
performs a singular value decomposition of the parent matrix. Solves the problem with orthogonal matrices and and rectangular matrix containing the singular values on its diagonal
sval | denotes the vector of singular values on return | |
u | denotes the matrix of the left vectors on return | |
v | denotes the matrix of teh right vectors on return |
XMatrix tngmath::XMatrix::Wave | ( | const Matrix::TIndex & | mother, | |
const Matrix::TScalar & | dt, | |||
const Matrix::TIndex & | jtot | |||
) | const |