LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::qrDecomposition< T > Class Template Reference

This functor computes a QRDecomposition of a given rectangular m x n Matrix A of the Form:. More...

#include <ltiQrDecomposition.h>

Inheritance diagram for lti::qrDecomposition< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::qrDecomposition< T >:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class qrDecomposition. More...

Public Member Functions

 qrDecomposition ()
 qrDecomposition (const parameters &par)
 qrDecomposition (const qrDecomposition &other)
virtual ~qrDecomposition ()
virtual const char * getTypeName () const
bool apply (matrix< T > &srcdest, matrix< T > &r) const
bool apply (const matrix< T > &src, matrix< T > &q, matrix< T > &r) const
qrDecompositioncopy (const qrDecomposition &other)
qrDecompositionoperator= (const qrDecomposition &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

template<class T>
class lti::qrDecomposition< T >

This functor computes a QRDecomposition of a given rectangular m x n Matrix A of the Form:.

A = Q * R

Where R is an upper triangular m x m Matrix and Q is a m x n orthogonal matrix. Transpose of Q muliplied with Q itself is the identity Matrix.

If LAPACK is not used or not available, A must be of full rang!

 matrix<float> src(3,3);
 float data[] =  {1,2,3,4,5,6,7,8,9};
 src.fill(data);
 matrix<float> q,r;

 qrDecomposition<float> qrd;
 qrd.apply(src,q,r);

 matrix<float> result;
 result.multiply(q,r);

 std::cout << "Q:\n" << q << "\n";
 std::cout << "R:\n" << r << "\n";
 // should be identical to src
 std::cout << "A = Q * R:\n"<< result << "\n";

Constructor & Destructor Documentation

template<class T >
lti::qrDecomposition< T >::qrDecomposition (  ) 

Default constructor.

template<class T >
lti::qrDecomposition< T >::qrDecomposition ( const parameters par  ) 

Construct a functor using the given parameters.

template<class T >
lti::qrDecomposition< T >::qrDecomposition ( const qrDecomposition< T > &  other  ) 

Copy constructor.

Parameters:
other the object to be copied
template<class T >
virtual lti::qrDecomposition< T >::~qrDecomposition (  )  [virtual]

Destructor.


Member Function Documentation

template<class T >
bool lti::qrDecomposition< T >::apply ( const matrix< T > &  src,
matrix< T > &  q,
matrix< T > &  r 
) const

operates on a copy of the given parameters.

Parameters:
src matrix<T> with the source data.
q matrix<T> where Q will be left.
r matrix<T> where R will be left.
Returns:
true if apply successful or false otherwise.
template<class T >
bool lti::qrDecomposition< T >::apply ( matrix< T > &  srcdest,
matrix< T > &  r 
) const

operates on the given parameter.

Parameters:
srcdest matrix<T> with the source data. The resulting Q will be left here too.
r matrix<T> where R will be left.
Returns:
true if apply successful or false otherwise.
template<class T >
virtual functor* lti::qrDecomposition< T >::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements lti::functor.

template<class T >
qrDecomposition& lti::qrDecomposition< T >::copy ( const qrDecomposition< T > &  other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

Referenced by lti::qrDecomposition< T >::parameters::copy(), lti::qrDecomposition< T >::parameters::operator=(), and lti::qrDecomposition< T >::parameters::parameters().

template<class T >
const parameters& lti::qrDecomposition< T >::getParameters (  )  const

Returns used parameters.

Reimplemented from lti::functor.

template<class T >
virtual const char* lti::qrDecomposition< T >::getTypeName (  )  const [virtual]

Returns the name of this type ("qrDecomposition").

Reimplemented from lti::linearAlgebraFunctor.

template<class T >
qrDecomposition& lti::qrDecomposition< T >::operator= ( const qrDecomposition< T > &  other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:28:37 2010 for LTI-Lib by Doxygen 1.6.1