tngmath::XMatrix Class Reference

A class that extends Matrix by many convenience methods. More...

#include <xmatrix.hpp>

Inheritance diagram for tngmath::XMatrix:

Inheritance graph
[legend]
Collaboration diagram for tngmath::XMatrix:

Collaboration graph
[legend]

List of all members.

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 &centers) 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
XMatrixoperator= (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


Detailed Description

A class that extends Matrix by many convenience methods.

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)


Member Function Documentation

XMatrix tngmath::XMatrix::AutoSpectrum ( const Matrix::TScalar &  dt,
const Matrix::TIndex &  m,
const Matrix::TScalar &  dom 
) const

Todo:
: Bucher

XMatrix tngmath::XMatrix::AutoSpectrum ( const Matrix::TScalar &  dt,
const Matrix::TScalar &  dom 
) const [inline]

Todo:
: Bucher

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

Todo:
: Bucher

XMatrix tngmath::XMatrix::CDF (  )  const

Todo:
: Bucher

XMatrix tngmath::XMatrix::Cholesky (  )  const

returns the Cholesky decomposition of the parent matrix, i.e. $ A=LL^T $ the parent matrix must be real symmetric and positive definite.

void tngmath::XMatrix::Cluster ( const Matrix::TScalar &  distance,
XMatrix index,
XMatrix centers 
) const [inline]

Todo:
: Bucher

void tngmath::XMatrix::Cluster ( const Matrix::TScalar &  distance,
XMatrix **  index,
XMatrix **  centers 
) const [inline]

Todo:
: Bucher

void tngmath::XMatrix::Cluster ( const Matrix::TScalar &  tol,
const Matrix scale,
XMatrix eval,
XMatrix evec 
) const

Todo:
: Bucher

void tngmath::XMatrix::Cluster ( const Matrix::TScalar &  tol,
const Matrix scale,
XMatrix **  eval,
XMatrix **  evec 
) const [inline]

Todo:
: Bucher

XMatrixColWise tngmath::XMatrix::ColWise (  )  [inline]

Returns:
a XMatrixColWise expression

Reimplemented from tngmath::Matrix.

XMatrix tngmath::XMatrix::Correlation ( const Matrix ar  )  const

Todo:
: Bucher

XMatrix tngmath::XMatrix::Covariance ( const Matrix ar  )  const

returns the covariance matrix of the parent array weighted by a parameter.

Parameters:
ar 
Todo:
: Bucher

XMatrix tngmath::XMatrix::CrossSpectrum ( const Matrix ar2,
const Matrix::TScalar &  dt,
const Matrix::TIndex &  m,
const Matrix::TScalar &  dom 
) const

Todo:
: Bucher

XMatrix tngmath::XMatrix::CrossSpectrum ( const Matrix ar2,
const Matrix::TScalar &  dt,
const Matrix::TScalar &  dom 
) const [inline]

Todo:
: Bucher

XMatrixCWise tngmath::XMatrix::CWise (  )  [inline]

Returns:
a XMatrixCWise expression

Reimplemented from tngmath::Matrix.

XMatrixEigen tngmath::XMatrix::Eigen (  ) 

Returns:
an Eigen decomposition object

Reimplemented from tngmath::Matrix.

void tngmath::XMatrix::EigenInPlace ( XMatrix evalr,
XMatrix evali,
XMatrix evec 
) const

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 $ \mathbf{A}\mathbf{x} = \lambda \mathbf{x} $.

Parameters:
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
Todo:
Bucher: werden hier alle eigenwerte rausgeschrieben und die realanteile und imaginäranteile auf beide VEktoren aufgeteilt? -> In Doku klartellen

void tngmath::XMatrix::EigenInPlace ( XMatrix **  evalr,
XMatrix **  evali,
XMatrix **  evec 
) const [inline]

Todo:
bucher

void tngmath::XMatrix::EigenLower ( XMatrix eval,
XMatrix evec 
) const

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 $ \mathbf{A}\mathbf{x} = \lambda \mathbf{x} $.

Parameters:
eval denotes the vector of eigenvalues on return
evec denotes the matrix of eigenvectors on return

void tngmath::XMatrix::EigenLower ( XMatrix **  eval,
XMatrix **  evec 
) const [inline]

Todo:
bucher

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 $ \mathbf{A}\mathbf{x} = \lambda \mathbf{B} \mathbf{x} $.

Parameters:
mass denotes the matrix $ \mathbf{B} $
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]

Todo:
bucher

XMatrixEigenSym tngmath::XMatrix::EigenSym ( const XMatrix mass,
bool  computeeigenvectors = true 
)

Returns:
a symmetric (lower triangular) Eigen decomposition object

a symmetric (upper triangular) Eigen decomposition object

a generalized symmetric Eigen decomposition object

XMatrixEigenSym tngmath::XMatrix::EigenSym ( bool  computeeigenvectors = true  ) 

Returns:
a symmetric Eigen decomposition object

Reimplemented from tngmath::Matrix.

void tngmath::XMatrix::EigenUpper ( XMatrix eval,
XMatrix evec 
) const

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 $ \mathbf{A}\mathbf{x} = \lambda \mathbf{x} $.

Parameters:
eval denotes the vector of eigenvalues on return
evec denotes the matrix of eigenvectors on return

void tngmath::XMatrix::EigenUpper ( XMatrix **  eval,
XMatrix **  evec 
) const [inline]

Todo:
bucher

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 $ \mathbf{A}\mathbf{x} = \lambda \mathbf{B} \mathbf{x} $.

Parameters:
mass denotes the matrix $ \mathbf{B} $
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]

Todo:
bucher

XMatrix tngmath::XMatrix::Exponential ( const Matrix::TScalar &  dt  )  const

returns the matrix exponential of the parent matrix

Parameters:
dt denotes the exponent.

XMatrix tngmath::XMatrix::FFT ( const Matrix::TScalar &  dt,
const Matrix::TScalar &  dom 
) const

Todo:
: Bucher

XMatrix tngmath::XMatrix::Histogram ( const Matrix::TIndex &  nclasses  )  const

Todo:
: Bucher

XMatrix tngmath::XMatrix::IFT ( const Matrix::TScalar &  dt,
const Matrix::TScalar &  dom 
) const

Todo:
: Bucher

void tngmath::XMatrix::Image ( const std::string &  file,
const Matrix::TIndex &  posterize = 0 
) const

Todo:
: Bucher

XMatrix tngmath::XMatrix::Invert (  )  const

returns the inverse of a square parent matrix.

Todo:
Bucher: Welcher Algorithmus?

XMatrix tngmath::XMatrix::InvertComplex (  )  const

returns the inverse of the parent matrix if it is complex

Todo:
Bucher: Details

XMatrix tngmath::XMatrix::Kendall (  )  const

Todo:
: Bucher

XMatrixLDLT tngmath::XMatrix::LDLT (  ) 

Returns:
an LDL decomposition object

Reimplemented from tngmath::Matrix.

XMatrixLLT tngmath::XMatrix::LLT (  ) 

Returns:
an LLT decomposition object

Reimplemented from tngmath::Matrix.

XMatrixLU tngmath::XMatrix::LU (  ) 

Returns:
an LU decomposition object

Reimplemented from tngmath::Matrix.

XMatrix tngmath::XMatrix::Mean ( const Matrix ar  )  const

returns the mean of the parent array whereby it is weighted by the given parameter.

Parameters:
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.

XMatrix tngmath::XMatrix::PDF ( const Matrix::TIndex &  nclasses = 0  )  const

Todo:
: Bucher

XMatrixQR tngmath::XMatrix::QR (  ) 

Returns:
an QRecomposition object

Reimplemented from tngmath::Matrix.

XMatrix tngmath::XMatrix::Quantile ( const Matrix::TScalar &  alpha  )  const

Todo:
: Bucher

XMatrixRowWise tngmath::XMatrix::RowWise (  )  [inline]

Returns:
a XMatrixRowWise expression

Reimplemented from tngmath::Matrix.

XMatrix tngmath::XMatrix::Sigma ( const Matrix ar  )  const

returns the standard deviation as the square root of the covariance

Parameters:
ar denotes the array of which is called.

XMatrix tngmath::XMatrix::Solve ( const Matrix rhs  )  const

returns the solution of a linear system of equations with given right hand side vector. Solves $ Ax=b $ where $ x $ is unknown.

Parameters:
rhs denotes the vector $ b $

XMatrixSVD tngmath::XMatrix::SVD (  ) 

Returns:
an SVD decomposition object

Reimplemented from tngmath::Matrix.

void tngmath::XMatrix::SVDInPlace ( XMatrix sval,
XMatrix u,
XMatrix v 
) const

performs a singular value decomposition of the parent matrix. Solves the problem $ \mathbf{A} = \mathbf{U} \mathbf{\Sigma} \mathbf{V}^T $ with orthogonal matrices $ \mathbf{U} $ and $ \mathbf{V} $ and rectangular matrix $ \mathbf{\Sigma} $ containing the singular values on its diagonal

Parameters:
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

void tngmath::XMatrix::SVDInPlace ( XMatrix **  sval,
XMatrix **  u,
XMatrix **  v 
) const [inline]

Todo:
bucher

XMatrix tngmath::XMatrix::Wave ( const Matrix::TIndex &  mother,
const Matrix::TScalar &  dt,
const Matrix::TIndex &  jtot 
) const

Todo:
: Bucher


The documentation for this class was generated from the following file:

Generated on Wed Nov 17 17:35:51 2010 for 'tngmath' Module Programming Interface by  doxygen 1.5.6