SG++-Doxygen-Documentation
sgpp::optimization::math Namespace Reference

Namespace with linear algebra functions. More...

## Functions

void hessenbergForm (base::DataMatrix &A, base::DataMatrix &V)
Hessenberg form of given matrix $$A$$ with transformation matrix $$V$$ with $$H = V^{-1} AV$$ in Hessenberg form (similiarity transformation such that entries $$(i,j)$$ vanish for $$i > j + 1$$, $$V$$ orthogonal). More...

void householderTransformation (const base::DataMatrix &A, size_t i, size_t j, base::DataMatrix &Q)
Calculate transformation matrix $$Q$$ of a Householder transformation. More...

void QRDecomposition (base::DataMatrix &A, base::DataMatrix &Q)
QR decomposition of given matrix $$A$$ with transformation matrix $$Q$$ with $$A = QR$$ ( $$Q$$ orthogonal and $$R$$ upper triangular). More...

void schurDecomposition (base::DataMatrix &A, base::DataMatrix &V)
Schur decomposition of given matrix $$A$$ with transformation matrix $$V$$ (similiarity transformation such that $$S = V^{-1} AV$$ upper triangular, $$V$$ orthogonal). More...

## Detailed Description

Namespace with linear algebra functions.

## Function Documentation

 void sgpp::optimization::math::hessenbergForm ( base::DataMatrix & A, base::DataMatrix & V )

Hessenberg form of given matrix $$A$$ with transformation matrix $$V$$ with $$H = V^{-1} AV$$ in Hessenberg form (similiarity transformation such that entries $$(i,j)$$ vanish for $$i > j + 1$$, $$V$$ orthogonal).

Parameters
 [in,out] A square matrix, afterwards $$H$$ [out] V transformation matrix (must have correct size $$n \times n$$)

Referenced by schurDecomposition().

 void sgpp::optimization::math::householderTransformation ( const base::DataMatrix & A, size_t i, size_t j, base::DataMatrix & Q )

Calculate transformation matrix $$Q$$ of a Householder transformation.

The normal vector (defining the reflection hyperplane) used is $$d := (c_1 + \sigma \lVert c \rVert_2, c_2, \dotsc, c_n)$$ with $$c := A(i:end,j)$$ and $$\sigma := +1$$ for $$\sigma \ge 0$$ and $$\sigma := -1$$ otherwise. $$Q$$ is symmetric and orthogonal (i.e. $$Q = Q^{\mathrm{t}} = Q^{-1}$$). After applying $$QA$$, the entries $$(i+1:end,j)$$ should vanish.

Parameters
 A square matrix containing the normal vector i row index of starting row of normal vector j column index of starting column of normal vector [out] Q transformation matrix (must have correct size $$(n-i) \times (n-i)$$)

Referenced by hessenbergForm(), and QRDecomposition().

 void sgpp::optimization::math::QRDecomposition ( base::DataMatrix & A, base::DataMatrix & Q )

QR decomposition of given matrix $$A$$ with transformation matrix $$Q$$ with $$A = QR$$ ( $$Q$$ orthogonal and $$R$$ upper triangular).

Parameters
 [in,out] A square matrix, afterwards $$R$$ [out] Q transformation matrix (must have correct size $$n \times n$$)

Referenced by schurDecomposition().

 void sgpp::optimization::math::schurDecomposition ( base::DataMatrix & A, base::DataMatrix & V )

Schur decomposition of given matrix $$A$$ with transformation matrix $$V$$ (similiarity transformation such that $$S = V^{-1} AV$$ upper triangular, $$V$$ orthogonal).

The diagonal of $$S$$ contains the eigenvalues of $$A$$. The Schur decomposition exists iff the characteristic polynomial of $$A$$ factorizes in real linear factors. If $$A$$ is symmetric, then the Schur decomposition exists with diagonal $$S$$, i.e., the columns of $$V$$ are the eigenvectors of $$A$$.

Parameters
 [in,out] A square matrix, afterwards $$S$$ [out] V transformation matrix (must have correct size $$n \times n$$)

Referenced by sgpp::optimization::optimizer::CMAES::optimize().