SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Used to construct and work with QR decompositions. More...
#include <rw/lapack/qr.h>
Inherits QRCalc.
Public Member Functions | |
RWQRDecomp () | |
RWQRDecomp (const RWQRDecomp< TypeT, QRCalc > &) | |
RWQRDecomp (const RWGenMat< TypeT > &A) | |
unsigned | cols () const |
void | factor (const RWGenMat< TypeT > &A) |
RWQRDecomp< TypeT, QRCalc > & | operator= (const RWQRDecomp< TypeT, QRCalc > &) |
RWGenMat< TypeT > | P () const |
RWMathVec< TypeT > | PTx (const RWMathVec< TypeT > &x) const |
RWMathVec< TypeT > | Px (const RWMathVec< TypeT > &x) const |
RWGenMat< TypeT > | Q () const |
RWMathVec< TypeT > | QTx (const RWMathVec< TypeT > &x) const |
RWMathVec< TypeT > | Qx (const RWMathVec< TypeT > &x) const |
RWGenMat< TypeT > | R () const |
RWMathVec< TypeT > | Rdiagonal () const |
RWMathVec< TypeT > | Rinvx (const RWMathVec< TypeT > &x) const |
unsigned | rows () const |
RWMathVec< TypeT > | RTinvx (const RWMathVec< TypeT > &x) const |
RWMathVec< TypeT > | RTx (const RWMathVec< TypeT > &x) const |
RWMathVec< TypeT > | Rx (const RWMathVec< TypeT > &x) const |
A QR decomposition is a representation of a matrix A of the form:
\[ AP = QR \]
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 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. A common use of QR decompositions is to solve linear least squares problems; this is most conveniently done using the RWLeastSqQR 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, to do the construction.
RWQRDecomp< TypeT, QRCalc >::RWQRDecomp | ( | ) |
Default constructor. Builds a decomposition of size 0 x 0.
RWQRDecomp< TypeT, QRCalc >::RWQRDecomp | ( | const RWQRDecomp< TypeT, QRCalc > & | ) |
Copy constructor. References the data in the original decomposition for efficiency.
RWQRDecomp< TypeT, QRCalc >::RWQRDecomp | ( | const RWGenMat< TypeT > & | A | ) |
Builds a QR decomposition of A. By default, pivoting is done so that the entries along the diagonal of R
are non-increasing. To construct a QR decomposition with non-default options, use the QR decomposition server class RWQRDecompServer.
|
inline |
Returns the number of columns in the matrix that the decomposition represents.
void RWQRDecomp< TypeT, QRCalc >::factor | ( | const RWGenMat< TypeT > & | A | ) |
Builds a QR decomposition of A.
RWQRDecomp<TypeT, QRCalc>& RWQRDecomp< TypeT, QRCalc >::operator= | ( | const RWQRDecomp< TypeT, QRCalc > & | ) |
Assigns the passed value to this decomposition. The current contents of the decomposition are lost.
RWGenMat<TypeT> RWQRDecomp< TypeT, QRCalc >::P | ( | ) | const |
Computes an explicit representation of the permutation matrix.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::PTx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the transpose of the permutation matrix P
and the vector x.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::Px | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the permutation matrix P
and the vector x.
RWGenMat<TypeT> RWQRDecomp< TypeT, QRCalc >::Q | ( | ) | const |
Computes an explicit representation of the orthogonal matrix Q
.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::QTx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the (conjugate) transpose of orthogonal matrix Q
and the vector x.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::Qx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the orthogonal matrix Q
and the vector x.
RWGenMat<TypeT> RWQRDecomp< TypeT, QRCalc >::R | ( | ) | const |
Returns an explicit representation of the upper trapezoidal matrix R
.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::Rdiagonal | ( | ) | const |
Returns the main diagonal of the upper trapezoidal matrix R
.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::Rinvx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the inverse of matrix R
and the vector x. An exception is raised if you call this for a singular decomposition.
|
inline |
Returns the number of rows in the matrix that the decomposition represents.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::RTinvx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the (conjugate) transpose inverse of matrix R
and the vector x. An exception is raised if you call this for a singular decomposition.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::RTx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the (conjugate) transpose of the matrix R
and the vector x.
RWMathVec<TypeT> RWQRDecomp< TypeT, QRCalc >::Rx | ( | const RWMathVec< TypeT > & | x | ) | const |
Computes the inner product of the matrix R
and the vector x.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |