-
template<typename T>
void unmqr(char *side, char *trans, integer *m, integer *n, integer *k, T *a, integer *lda, T *tau, T *c, integer *ldc, T *work, integer *lwork, integer *info)# Apply Q or Q’ from QR factorization.
Purpose:
Apply Q or Q' from QR factorization Overwrite the general complex m-by-n matrix c with side = 'L' side = 'R' trans = 'N': Q * C C * Q trans = 'H': Q**H * C C * Q**H where Q is a complex unitary matrix defined as the product of k elementary reflectors Q = H(1) H(2) . . . H(k) as returned by CGEQRF. Q is of order M if side = 'L' and of order N if side = 'R'.
- Parameters:
side – [in]
side is char*
= ‘L’: apply Q or Q**H from the Left;
= ‘R’: apply Q or Q**H from the Right.trans – [in]
trans is char*
= ‘N’: No transpose, apply Q;
= ‘H’: Transpose, apply Q**H.m – [in]
m is integer*
The number of rows of the matrix c. m >= 0.
n – [in]
n is integer*
The number of columns of the matrix c. n >= 0.
k – [in]
k is integer*
The number of elementary reflectors whose product defines the matrix Q.
If side = ‘L’, m >= k >= 0;
if side = ‘R’, n >= k >= 0.
a – [in]
a is COMPLEX/COMPLEX*16 array, dimension (lda,k)
The i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,…,k, as returned by CGEQRF in the first k columns of its array argument a.
lda – [in]
lda is integer*
The leading dimension of the array a.
If side = ‘L’, lda >= fla_max(1,m);
if side = ‘R’, lda >= fla_max(1,n).
tau – [in]
tau is COMPLEX/COMPLEX*16 array, dimension (k)
tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEQRF.
c – [inout]
c is COMPLEX/COMPLEX*16 array, dimension (ldc,n)
On entry, the m-by-n matrix c.
On exit, c is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.ldc – [in]
ldc is integer*
The leading dimension of the array c. ldc >= fla_max(1,m).
WORK – [out]
WORK is COMPLEX array, dimension (MAX(1,LWORK))
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK – [in]
LWORK is INTEGER
The dimension of the array WORK.
If SIDE = ‘L’, LWORK >= fla_max(1,N);
if SIDE = ‘R’, LWORK >= fla_max(1,M).
For good performance, LWORK should generally be larger.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value