SG++-Doxygen-Documentation
|
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... | |
Namespace with linear algebra functions.
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).
[in,out] | A | square matrix, afterwards \(H\) |
[out] | V | transformation matrix (must have correct size \(n \times n\)) |
References sgpp::base::DataMatrix::getNrows(), householderTransformation(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, m, friedman::p, sgpp::base::DataMatrix::resize(), and python.utils.pca_normalize_dataset::V.
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.
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)\)) |
References sgpp::base::DataMatrix::getNrows(), python.statsfileInfo::i, m, friedman::p, and chess::r.
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).
[in,out] | A | square matrix, afterwards \(R\) |
[out] | Q | transformation matrix (must have correct size \(n \times n\)) |
References sgpp::base::DataMatrix::getNrows(), householderTransformation(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, m, and sgpp::base::DataMatrix::resize().
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\).
[in,out] | A | square matrix, afterwards \(S\) |
[out] | V | transformation matrix (must have correct size \(n \times n\)) |
References sgpp::base::DataMatrix::getNrows(), hessenbergForm(), python.statsfileInfo::i, python.utils.statsfile2gnuplot::j, lambda, m, friedman::p, QRDecomposition(), sgpp::base::DataMatrix::resize(), and python.utils.pca_normalize_dataset::V.
Referenced by sgpp::optimization::optimizer::CMAES::optimize().