-
template<typename T>
void orm2r(char *side, char *trans, integer *m, integer *n, integer *k, T *a, integer *lda, T *tau, T *c, integer *ldc, T *work, integer *info)# Multiply a general matrix by the orthogonal matrix from a QR factorization determined by sgeqrf (unblocked algorithm).
Purpose:
Multiply a general matrix by the orthogonal matrix from a QR factorization determined by sgeqrf (unblocked algorithm). Overwrite the general real m by n matrix c with Q * C if side = 'L' and trans = 'N', or Q**T* C if side = 'L' and trans = 'T', or C * Q if side = 'R' and trans = 'N', or C * Q**T if side = 'R' and trans = 'T', where Q is a real orthogonal matrix defined as the product of k elementary reflectors Q = H(1) H(2) . . . H(k) as returned by SGEQRF. 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**T from the Left;
= ‘R’: apply Q or Q**T from the Right.trans – [in]
trans is char*
= ‘N’: No transpose, apply Q;
= ‘T’: Transpose, apply Q**T.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 float/double 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 SGEQRF 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 float/double array, dimension (k)
tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEQRF.
c – [inout]
c is float/double array, dimension (ldc,n)
On entry, the m-by-n matrix c.
On exit, c is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.ldc – [in]
ldc is integer*
The leading dimension of the array c. ldc >= fla_max(1,m).
WORK – [out]
WORK is REAL array, dimension
(N) if SIDE = ‘L’,
(M) if SIDE = ‘R’INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value