|
OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Least-square solution of systems of linear equations. More...
#include <QRSolver.h>

Public Member Functions | |
| QRSolver (const Matrix< double > &A, const Vector< double > &B, bool pivot) | |
| Constructor. More... | |
| ~QRSolver () | |
| void | solveR (Vector< double > &X) const |
| Solution of $A*X = B$ in the least-squares sense. More... | |
| void | solveS (const Array1D< double > &D, double p, Vector< double > &X) |
| Solution of $A*X = B, D*X = 0$ in the least-squares sense. More... | |
| void | solveRT (Vector< double > &V) const |
| Pre-multiply the vector $V$ by $R.transpose()^{-1}$. More... | |
| void | solveST (Vector< double > &V) const |
| Pre-multiply the vector $V$ by $S.transpose()^{-1}$. More... | |
| void | getColNorm (Array1D< double > &) const |
| Return the original column norms of the matrix $A$. More... | |
Private Member Functions | |
| void | R_to_S (const Matrix< double > &R, const Array1D< double > &D, Matrix< double > &S, Vector< double > &Z) |
| void | solve (const Matrix< double > &R, const Vector< double > &QtB, Vector< double > &X) const |
| void | solveT (const Matrix< double > &R, Vector< double > &V) const |
Private Attributes | |
| int | n |
| int | m |
| Array2D< double > | Q |
| Matrix< double > | R |
| Vector< double > | QtB |
| Matrix< double > | S |
| Array1D< double > | column_norm |
| Array1D< int > | piv_col |
Least-square solution of systems of linear equations.
Definition at line 60 of file QRSolver.h.
Constructor.
Definition at line 64 of file QRSolver.cpp.
References dot(), min(), Hypervolume::n, Attrib::Distribution::R, Array1D< T >::size(), sqrt(), and sum().

| QRSolver::~QRSolver | ( | ) |
Definition at line 144 of file QRSolver.cpp.
| void QRSolver::getColNorm | ( | Array1D< double > & | norms | ) | const |
Return the original column norms of the matrix $A$.
Definition at line 174 of file QRSolver.cpp.
References column_norm.
Referenced by LMDif::execute().
|
private |
Definition at line 179 of file QRSolver.cpp.
References Physics::c, n, piv_col, QtB, R, S, Array1D< T >::size(), and sqrt().
Referenced by solveS().

| void QRSolver::solveR | ( | Vector< double > & | X | ) | const |
Solution of $A*X = B$ in the least-squares sense.
Definition at line 148 of file QRSolver.cpp.
References QtB, R, and solve().
Referenced by LMDif::lmpar().

| void QRSolver::solveRT | ( | Vector< double > & | V | ) | const |
Pre-multiply the vector $V$ by $R.transpose()^{-1}$.
Definition at line 164 of file QRSolver.cpp.

Solution of $A*X = B, D*X = 0$ in the least-squares sense.
Definition at line 153 of file QRSolver.cpp.
References m, n, R, R_to_S(), S, solve(), and sqrt().
Referenced by LMDif::lmpar().

| void QRSolver::solveST | ( | Vector< double > & | V | ) | const |
Pre-multiply the vector $V$ by $S.transpose()^{-1}$.
Definition at line 169 of file QRSolver.cpp.
Referenced by LMDif::lmpar().

Definition at line 257 of file QRSolver.cpp.
References n, piv_col, R, Array1D< T >::size(), and X.
Referenced by solveRT(), and solveST().

|
private |
Definition at line 132 of file QRSolver.h.
Referenced by getColNorm().
|
private |
Definition at line 116 of file QRSolver.h.
Referenced by solveS().
|
private |
|
private |
Definition at line 136 of file QRSolver.h.
|
private |
Definition at line 120 of file QRSolver.h.
|
private |
Definition at line 126 of file QRSolver.h.
|
private |
|
private |
Definition at line 129 of file QRSolver.h.
1.8.5