
Public Member Functions | |
| Householder () | |
| template<typename number2 > | |
| Householder (const FullMatrix< number2 > &) | |
| template<typename number2 > | |
| void | initialize (const FullMatrix< number2 > &) |
| template<typename number2 > | |
| double | least_squares (Vector< number2 > &dst, const Vector< number2 > &src) const |
| template<typename number2 > | |
| double | least_squares (BlockVector< number2 > &dst, const BlockVector< number2 > &src) const |
| template<class VECTOR > | |
| void | vmult (VECTOR &dst, const VECTOR &src) const |
| template<class VECTOR > | |
| void | Tvmult (VECTOR &dst, const VECTOR &src) const |
Private Attributes | |
| std::vector< number > | diagonal |
QR-decomposition of a full matrix.
Whenever an object of this class is created, it copies the matrix given and computes its QR-decomposition by Householder algorithm. Then, the function least_squares() can be used to compute the vector x minimizing ||Ax-b|| for a given vector b.
<float> and <double>; others can be generated in application programs (see the section on Template instantiations in the manual).Definition at line 51 of file householder.h.
| Householder< number >::Householder | ( | ) |
Create an empty object.
| Householder< number >::Householder | ( | const FullMatrix< number2 > & | ) |
Create an object holding the QR-decomposition of a matrix.
| void Householder< number >::initialize | ( | const FullMatrix< number2 > & | ) |
Compute the QR-decomposition of another matrix.
| double Householder< number >::least_squares | ( | Vector< number2 > & | dst, |
| const Vector< number2 > & | src | ||
| ) | const |
Solve the least-squares problem for the right hand side src. The return value is the Euclidean norm of the approximation error.
dst contains the solution of the least squares problem on return.src contains the right hand side b of the least squares problem. It will be changed during the algorithm and is unusable on return. | double Householder< number >::least_squares | ( | BlockVector< number2 > & | dst, |
| const BlockVector< number2 > & | src | ||
| ) | const |
This function does the same as the one for BlockVectors.
| void Householder< number >::vmult | ( | VECTOR & | dst, |
| const VECTOR & | src | ||
| ) | const |
A wrapper to least_squares(), implementing the standard MATRIX interface.
| void Householder< number >::Tvmult | ( | VECTOR & | dst, |
| const VECTOR & | src | ||
| ) | const |
std::vector<number> Householder< number >::diagonal [private] |
Storage for the diagonal elements of the orthogonal transformation.
Definition at line 121 of file householder.h.
documentation generated on Fri Feb 3 2012 06:04:09 by
doxygen
1.7.2