Lapack++
|
Represent a QR decomposition. More...
#include <gfqrd.h>
Public Member Functions | |
LaGenQRFactDouble () | |
LaGenQRFactDouble (LaGenMatDouble &A) | |
LaGenQRFactDouble (LaGenQRFactDouble &QR) | |
~LaGenQRFactDouble () | |
void | decomposeQR_IP (LaGenMatDouble &A) |
LaGenMatDouble & | generateQ_IP () |
void | generateQ (LaGenMatDouble &A) const |
void | Mat_Mult (LaGenMatDouble &C, bool hermitian, bool from_left) const |
Represent a QR decomposition.
This class calculates the QR factorization of a real m-by-n Matrix given by
for , where
is an n-by-n upper triangular matrix and
is an m-by-m unitary matrix. If
is of full rank n, then
is non-singular.
See http://www.netlib.org/lapack/lug/node40.html for more details.
LaGenQRFactDouble::LaGenQRFactDouble | ( | ) |
Null constructor. Use decomposeQR_IP() to actually use this object.
LaGenQRFactDouble::LaGenQRFactDouble | ( | LaGenMatDouble & | A | ) |
Constructor that directly calculates the QR decomposition from the given matrix A, in-place. See decomposeQR_IP() for more about the implications of this.
LaGenQRFactDouble::LaGenQRFactDouble | ( | LaGenQRFactDouble & | QR | ) |
Copy constructor.
LaGenQRFactDouble::~LaGenQRFactDouble | ( | ) |
Default destructor.
void LaGenQRFactDouble::decomposeQR_IP | ( | LaGenMatDouble & | A | ) |
Calculate the QR decomposition of A.
This is in-place, i.e. it destroys the input matrix A and keeps a reference to its memory around. In other words, you cannot do anything with your input matrix A anymore. You can safely delete any references to A because this object will keep its own references still around.
Internally this uses the lapack routine dgeqrf
.
LaGenMatDouble& LaGenQRFactDouble::generateQ_IP | ( | ) |
Generate the matrix Q explicitly. This is in-place, i.e. it destroys the internal QR decomposition but only calculates the matrix Q.
Internally this uses the lapack routine dorgqr
.
void LaGenQRFactDouble::generateQ | ( | LaGenMatDouble & | A | ) | const |
Generate the matrix Q explicitly. The given matrix A will be overwritten by the matrix Q.
Internally this uses the lapack routine dorgqr
.
void LaGenQRFactDouble::Mat_Mult | ( | LaGenMatDouble & | C, |
bool | hermitian, | ||
bool | from_left | ||
) | const |
Multiply the matrix C by the matrix Q of the QR decomposition that is represented through this object. This method calculates one out of the following four different calculations:
This does not modify the internal QR decomposition, so this multiplication can be applied repeatedly.
Internally this uses the lapack routine zunmqr
.
C | The matrix to be multiplied. |
hermitian | If true, then ![]() ![]() |
from_left | If true, then Q or ![]() C=Q*C . If false, then Q is applied from the right so that C=C*Q . |