Householder< number > Class Template Reference
[Derived matrices]

Inheritance diagram for Householder< number >:

Inheritance graph
[legend]

List of all members.

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

Private Attributes

std::vector< number > diagonal


Detailed Description

template<typename number>
class Householder< number >

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.

Note:
Instantiations for this template are provided for <float> and <double>; others can be generated in application programs (see the section on Template instantiations in the manual).
Author:
Guido Kanschat, 2005

Constructor & Destructor Documentation

template<typename number>
Householder< number >::Householder (  ) 

Create an empty object.

template<typename number>
template<typename number2 >
Householder< number >::Householder ( const FullMatrix< number2 > &   )  [inline]

Create an object holding the QR-decomposition of a matrix.


Member Function Documentation

template<typename number>
template<typename number2 >
void Householder< number >::initialize ( const FullMatrix< number2 > &   )  [inline]

Compute the QR-decomposition of another matrix.

template<typename number>
template<typename number2 >
double Householder< number >::least_squares ( Vector< number2 > &  dst,
const Vector< number2 > &  src 
) const [inline]

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.


Member Data Documentation

template<typename number>
std::vector<number> Householder< number >::diagonal [private]

Storage for the diagonal elements of the orthogonal transformation.


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

deal.II documentation generated on Sat Aug 15 16:52:03 2009 by doxygen 1.5.9