#include <gfqrc.h>
Public Member Functions | |
LaGenQRFactComplex () | |
LaGenQRFactComplex (LaGenMatComplex &A) | |
LaGenQRFactComplex (LaGenQRFactComplex &QR) | |
~LaGenQRFactComplex () | |
void | decomposeQR_IP (LaGenMatComplex &A) |
LaGenMatComplex & | generateQ_IP () |
void | generateQ (LaGenMatComplex &A) const |
void | Mat_Mult (LaGenMatComplex &C, bool hermitian, bool from_left) const |
This class calculates the QR factorization of a general 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.
LaGenQRFactComplex::LaGenQRFactComplex | ( | ) |
Null constructor. Use decomposeQR_IP() to actually use this object.
LaGenQRFactComplex::LaGenQRFactComplex | ( | LaGenMatComplex & | 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.
LaGenQRFactComplex::LaGenQRFactComplex | ( | LaGenQRFactComplex & | QR | ) |
Copy constructor.
LaGenQRFactComplex::~LaGenQRFactComplex | ( | ) |
Default destructor.
void LaGenQRFactComplex::decomposeQR_IP | ( | LaGenMatComplex & | 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 zgeqrf
.
LaGenMatComplex& LaGenQRFactComplex::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 zungqr
.
void LaGenQRFactComplex::generateQ | ( | LaGenMatComplex & | A | ) | const |
Generate the matrix Q explicitly. The given matrix A will be overwritten by the matrix Q.
Internally this uses the lapack routine zungqr
.
void LaGenQRFactComplex::Mat_Mult | ( | LaGenMatComplex & | 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 (hermitian, or conjugate transposed) is used. If false, then is used directly. | |
from_left | If true, then Q or is applied from the left so that C=Q*C . If false, then Q is applied from the right so that C=C*Q . |