XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ zunmlq()

void zunmlq ( char  side,
char  trans,
int  m,
int  n,
int  k,
int  lda,
doublecomplex  a[],
doublecomplex  tau[],
int  ldc,
doublecomplex  c[],
doublecomplex  work[],
int  lwork,
int *  info 
)

Multiplies matrix by Q of LQ factorization of a complex matrix

Purpose
This routine overwrites the general complex m x n matrix C with
side = 'L' side = 'R'
trans = 'N': Q * C C * Q
trans = 'C': Q^H * C C * Q^H
where Q is a complex unitary matrix defined as the product of k elementary reflectors
Q = H(k) . . . H(2) H(1)
as returned by zgelqf. Q is of order m if side = 'L' and of order n if side = 'R'.
Parameters
[in]side= 'L': Apply Q or Q^H from the left.
= 'R': Apply Q or Q^H from the right.
[in]trans= 'N': No transpose, apply Q.
= 'C': Conjugate transpose, apply Q^H.
[in]mNumber of rows of the matrix C. (m >= 0) (If m = 0, returns without computation)
[in]nNumber of columns of the matrix C. (n >= 0) (If n = 0, returns without computation)
[in]kNumber of elementary reflectors whose product defines the matrix Q. (m => k >= 0 if side = 'L', n >= k >= 0 if side = 'R') (if k = 0, returns without computation)
[in]ldaLeading dimension of the two dimensional array a[][]. (lda >= max(1, k))
[in]a[][]Array a[la][lda] (la >= m if side = 'L', la >= n if side = 'R')
The i-th row must contain the vector which defines the elementary reflector H(i), for i = 1, 2, ..., k, as returned by zgelqf in the first k rows of its array argument a[][].
[in]tau[]Array tau[ltau] (ltau >= k)
The scalar factors of the elementary reflectors H(i) as returned by zgelqf.
[in]ldcLeading dimension of the two dimensional array c[][]. (ldc >= max(1, m))
[in,out]c[][]Array c[lc][ldc] (lc >= n)
[in] m x n matrix C.
[out] c[][] is overwritten by Q*C or Q^H*C or C*Q^H or C*Q.
[out]work[]Array work[lwork]
Work array.
On exit, if info = 0, work[0] returns the optimal lwork.
[in]lworkThe dimension of the array work[]. (lwork >= max(1, n) if side = 'L', lwork >= max(1, m) if side = 'R')
For good performance lwork should genrally be larger.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] array, and returns the value in work[0].
[out]info= 0: Successful exit
= -1: The argument side had an illegal value (side != 'L' nor 'R')
= -2: The argument trans had an illegal value (trans != 'C' nor 'N')
= -3: The argument m had an illegal value (m < 0)
= -4: The argument n had an illegal value (n < 0)
= -5: The argument k had an illegal value (k < 0 or k > m or n)
= -6: The argument lda had an illegal value (lda < max(1, k))
= -9: The argument ldc had an illegal value (ldc < max(1, m))
= -12: The argument lwork had an illegal value (lwork too small)
Reference
LAPACK