-
template<typename T>
void gelq(integer *m, integer *n, T *a, integer *lda, T *t, integer *tsize, T *work, integer *lwork, integer *info)# Computes LQ factorization of a real matrix.
Purpose:
GELQ computes an LQ factorization of a real M-by-N matrix A: A = ( L 0) * Q where: Q is a N-by-N orthogonal matrix; L is an lower-triangular M-by-M matrix; 0 is a M-by-(N-M) zero matrix, if M < N.
- Parameters:
M – [in]
M is INTEGER
The number of rows of the matrix A. M >= 0.
N – [in]
N is INTEGER
The number of columns of the matrix A. N >= 0.
A – [inout]
A is REAL array, dimension (LDA,N)
On entry, the M-by-N matrix A.
On exit, the elements on and below the diagonal of the array contain the M-by-min(M,N) lower trapezoidal matrix L (L is lower triangular if M <= N); the elements above the diagonal are used to store part of the data structure to represent - computes row and column scaling to reduce condition number of matrixLDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >= fla_max(1,M).
T – [out]
T is REAL array, dimension (MAX(5,TSIZE))
On exit, if INFO = 0, T(1) returns optimal (or either minimal or optimal, if query is assumed) TSIZE. See TSIZE for details. Remaining T contains part of the data structure used to represent Q. If one wants to apply or construct Q, then one needs to keep T (in addition to A) and pass it to further subroutines.
TSIZE – [in]
TSIZE is INTEGER
If TSIZE >= 5, the dimension of the array T.
If TSIZE = -1 or -2, then a workspace query is assumed. The routine only calculates the sizes of the T and WORK arrays, returns these values as the first entries of the T and WORK arrays, and no error message related to T or WORK is issued by XERBLA.
If TSIZE = -1, the routine calculates optimal size of T for the optimum performance and returns this value in T(1).
If TSIZE = -2, the routine calculates minimal size of T and returns this value in T(1).WORK – [out]
(workspace) REAL array, dimension (MAX(1,LWORK))
On exit, if INFO = 0, WORK(1) contains optimal (or either minimal or optimal, if query was assumed) LWORK. See LWORK for details.
LWORK – [in]
LWORK is INTEGER
The dimension of the array WORK.
If LWORK = -1 or -2, then a workspace query is assumed. The routine only calculates the sizes of the T and WORK arrays, returns these values as the first entries of the T and WORK arrays, and no error message related to T or WORK is issued by XERBLA.
If LWORK = -1, the routine calculates optimal size of WORK for the optimal performance and returns this value in WORK(1).
If LWORK = -2, the routine calculates minimal size of WORK and returns this value in WORK(1).INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value