Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Linear Algebra Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWQRDecomp<T,QRCalc>

Module:  Linear Algebra   Group:  Decomposition classes


Does not inherit

Local Index

Members

Synopsis

#include <rw/lapack/qr.h>
#include <rw/lapack/qrcalcp3.h>

RWQRDecomp<double, RWQRCalcP3<double> > qr(A);  // A is a RWGenMat<double>

Description

A QR decomposition is a representation of a matrix A of the form:

where P is a permutation matrix, Q is orthogonal, and R is upper trapezoidal, or upper triangular if A is full rank, with no more columns than rows.

The class RWQRDecomp<T,QRCalc> is used to construct and work with QR decompositions. Sometimes it is desirable to zero out the rectangular part of the trapezoidal matrix R; this can be done using the orthogonal decomposition class, RWQRDecomp<T,QRCalc>. A common use of QR decompositions is to solve linear least squares problems; this is most conveniently done using the RWLeastSqQR<T,QRCalc> class.

You may need more control over the computation of the decomposition than is provided by this class. For example, if you don't want to use pivoting, you can use the QR decomposition server class, RWQRDecompServer<T,QRCalc>, to do the construction.


NOTE -- For greater flexibility, the user can implement this method, or the Linear Algebra Module provides two classes to perform this function - RWQRCalc<T> and RWQRCalcP3<T>. Please see their descriptions in this reference guide for more information.

Example

Public Constructors

RWQRDecomp();
RWQRDecomp(const RWQRDecomp<T,QRCalc>& A);
RWQRDecomp(const RWGenMat<T>& A);

Public Member Functions

unsigned
cols();
void
factor(const RWGenMat<T>& A);
RWGenMat<T>
P();
RWMathVec<T>
Px(const RWMathVec<T>& x);
RWMathVec<T>
PTx(const RWMathVec<T>& x);
RWGenMat<T>
Q();
RWMathVec<T>
Qx(const RWMathVec<T>& x);
RWMathVec<T>
QTx(const RWMathVec<T>& x);
RWGenMat<T>
R();
RWMathVec<T>
Rdiagonal();
RWMathVec<T> 
Rx(const RWMathVec<T>& x);
RWMathVec<T>
RTx(const RWMathVec<T>& x);
RWMathVec<T> 
Rinvx(const RWMathVec<T>& x);
RWMathVec<T> 
RTinvx(const RWMathVec<T>& x);
unsigned
rows();

Public Member Operator

void
operator=(const RWQRDecomp<T,QRCalc>&);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.