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

◆ zgelqf()

void zgelqf ( int  m,
int  n,
int  lda,
doublecomplex  a[],
doublecomplex  tau[],
doublecomplex  work[],
int  lwork,
int *  info 
)

LQ factorization of a complex

Purpose
This routine computes a LQ factorization of a complex m x n matrix A.
A = L * Q
Parameters
[in]mNumber of rows of the matrix A. (m >= 0) (If m = 0, returns without computation)
[in]nNumber of columns of the matrix A. (n >= 0) (If n = 0, returns without computation)
[in]ldaLeading dimension of the two dimensional array a[][]. (lda >= max(1, m))
[in,out]a[][]Array a[la][lda] (la >= n)
[in] m x n matrix A.
[out] The elements on and above the diagonal of the array contains the m x min(m, n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau[], represent the unitary matrix Q as a product of elementary reflectors (see Further Details).
[out]tau[]Array tau[ltau] (ltau >= min(m, n))
The scalar factors of the elementary reflectors (see Further Details).
[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, m))
For optimal performance lwork >= m*nb, where nb is the optimal blocksize.
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 m had an illegal value (m < 0)
= -2: The argument n had an illegal value (n < 0)
= -3: The argument lda had an illegal value (lda < max(1, m))
= -7: The argument lwork had an illegal value (lwork too small)
Further Details
The matrix Q is represented as a product of elementary reflectors
Q = H(k) . . . H(2) H(1), where k = min(m, n).
Each H(i) has the form
H(i) = I - tau * v * v^H
where tau is a complex scalar, and v is a complex vector with v(1 to i-1) = 0 and v(i) = 1; v(i+1 to n) is stored on exit in a[i to n-1][i-1], and tau in tau[i-1].
Reference
LAPACK