Public Member Functions | Private Attributes

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
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

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

Definition at line 51 of file householder.h.


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 > &   )

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 > &   )

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

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.
template<typename number>
template<typename number2 >
double Householder< number >::least_squares ( BlockVector< number2 > &  dst,
const BlockVector< number2 > &  src 
) const

This function does the same as the one for BlockVectors.

template<typename number>
template<class VECTOR >
void Householder< number >::vmult ( VECTOR &  dst,
const VECTOR &  src 
) const

A wrapper to least_squares(), implementing the standard MATRIX interface.

template<typename number>
template<class VECTOR >
void Householder< number >::Tvmult ( VECTOR &  dst,
const VECTOR &  src 
) const

Member Data Documentation

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

Storage for the diagonal elements of the orthogonal transformation.

Definition at line 121 of file householder.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:09 by doxygen 1.7.2