gels#
Functions
-
void sgels(const char *trans, const INT m, const INT n, const INT nrhs, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, f32 *restrict work, const INT lwork, INT *info)#
SGELS solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A.
It is assumed that A has full rank, and only a rudimentary protection against rank-deficient matrices is provided.
The following options are provided:
If TRANS = ‘N’ and m >= n: find the least squares solution of an overdetermined system, minimize || B - A*X ||.
If TRANS = ‘N’ and m < n: find the minimum norm solution of an underdetermined system A * X = B.
If TRANS = ‘T’ and m >= n: find the minimum norm solution of an underdetermined system A^T * X = B.
If TRANS = ‘T’ and m < n: find the least squares solution of an overdetermined system, minimize || B - A^T * X ||.
Parameters
intrans‘N’: the linear system involves A; ‘T’: the linear system involves A^T.
inmThe number of rows of A. m >= 0.
innThe number of columns of A. n >= 0.
innrhsThe number of right hand sides. nrhs >= 0.
inoutADouble precision array, dimension (lda, n). On entry, the m-by-n matrix A. On exit, overwritten by its QR or LQ factorization.
inldaLeading dimension of A. lda >= max(1, m).
inoutBDouble precision array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, overwritten by the solution vectors.
inldbLeading dimension of B. ldb >= max(1, m, n).
outworkDouble precision array, dimension (max(1, lwork)). On exit, work[0] returns the optimal lwork.
inlworkDimension of work. lwork >= max(1, mn + max(mn, nrhs)). If lwork == -1, workspace query only.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, the i-th diagonal element of the triangular factor of A is zero, so A does not have full rank.
void sgels(
const char* trans,
const INT m,
const INT n,
const INT nrhs,
f32* restrict A,
const INT lda,
f32* restrict B,
const INT ldb,
f32* restrict work,
const INT lwork,
INT* info
);
Functions
-
void dgels(const char *trans, const INT m, const INT n, const INT nrhs, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, f64 *restrict work, const INT lwork, INT *info)#
DGELS solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A.
It is assumed that A has full rank, and only a rudimentary protection against rank-deficient matrices is provided.
The following options are provided:
If TRANS = ‘N’ and m >= n: find the least squares solution of an overdetermined system, minimize || B - A*X ||.
If TRANS = ‘N’ and m < n: find the minimum norm solution of an underdetermined system A * X = B.
If TRANS = ‘T’ and m >= n: find the minimum norm solution of an underdetermined system A^T * X = B.
If TRANS = ‘T’ and m < n: find the least squares solution of an overdetermined system, minimize || B - A^T * X ||.
Parameters
intrans‘N’: the linear system involves A; ‘T’: the linear system involves A^T.
inmThe number of rows of A. m >= 0.
innThe number of columns of A. n >= 0.
innrhsThe number of right hand sides. nrhs >= 0.
inoutADouble precision array, dimension (lda, n). On entry, the m-by-n matrix A. On exit, overwritten by its QR or LQ factorization.
inldaLeading dimension of A. lda >= max(1, m).
inoutBDouble precision array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, overwritten by the solution vectors.
inldbLeading dimension of B. ldb >= max(1, m, n).
outworkDouble precision array, dimension (max(1, lwork)). On exit, work[0] returns the optimal lwork.
inlworkDimension of work. lwork >= max(1, mn + max(mn, nrhs)). If lwork == -1, workspace query only.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, the i-th diagonal element of the triangular factor of A is zero, so A does not have full rank.
void dgels(
const char* trans,
const INT m,
const INT n,
const INT nrhs,
f64* restrict A,
const INT lda,
f64* restrict B,
const INT ldb,
f64* restrict work,
const INT lwork,
INT* info
);
Functions
-
void cgels(const char *trans, const INT m, const INT n, const INT nrhs, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, c64 *restrict work, const INT lwork, INT *info)#
CGELS solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A.
It is assumed that A has full rank, and only a rudimentary protection against rank-deficient matrices is provided.
The following options are provided:
If TRANS = ‘N’ and m >= n: find the least squares solution of an overdetermined system, minimize || B - A*X ||.
If TRANS = ‘N’ and m < n: find the minimum norm solution of an underdetermined system A * X = B.
If TRANS = ‘C’ and m >= n: find the minimum norm solution of an underdetermined system A^H * X = B.
If TRANS = ‘C’ and m < n: find the least squares solution of an overdetermined system, minimize || B - A^H * X ||.
Parameters
intrans‘N’: the linear system involves A; ‘C’: the linear system involves A^H.
inmThe number of rows of A. m >= 0.
innThe number of columns of A. n >= 0.
innrhsThe number of right hand sides. nrhs >= 0.
inoutAComplex*16 array, dimension (lda, n). On entry, the m-by-n matrix A. On exit, overwritten by its QR or LQ factorization.
inldaLeading dimension of A. lda >= max(1, m).
inoutBComplex*16 array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, overwritten by the solution vectors.
inldbLeading dimension of B. ldb >= max(1, m, n).
outworkComplex*16 array, dimension (max(1, lwork)). On exit, work[0] returns the optimal lwork.
inlworkDimension of work. lwork >= max(1, mn + max(mn, nrhs)). If lwork == -1, workspace query only.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, the i-th diagonal element of the triangular factor of A is zero, so A does not have full rank.
void cgels(
const char* trans,
const INT m,
const INT n,
const INT nrhs,
c64* restrict A,
const INT lda,
c64* restrict B,
const INT ldb,
c64* restrict work,
const INT lwork,
INT* info
);
Functions
-
void zgels(const char *trans, const INT m, const INT n, const INT nrhs, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, c128 *restrict work, const INT lwork, INT *info)#
ZGELS solves overdetermined or underdetermined complex linear systems involving an M-by-N matrix A, or its conjugate-transpose, using a QR or LQ factorization of A.
It is assumed that A has full rank, and only a rudimentary protection against rank-deficient matrices is provided.
The following options are provided:
If TRANS = ‘N’ and m >= n: find the least squares solution of an overdetermined system, minimize || B - A*X ||.
If TRANS = ‘N’ and m < n: find the minimum norm solution of an underdetermined system A * X = B.
If TRANS = ‘C’ and m >= n: find the minimum norm solution of an underdetermined system A^H * X = B.
If TRANS = ‘C’ and m < n: find the least squares solution of an overdetermined system, minimize || B - A^H * X ||.
Parameters
intrans‘N’: the linear system involves A; ‘C’: the linear system involves A^H.
inmThe number of rows of A. m >= 0.
innThe number of columns of A. n >= 0.
innrhsThe number of right hand sides. nrhs >= 0.
inoutAComplex*16 array, dimension (lda, n). On entry, the m-by-n matrix A. On exit, overwritten by its QR or LQ factorization.
inldaLeading dimension of A. lda >= max(1, m).
inoutBComplex*16 array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, overwritten by the solution vectors.
inldbLeading dimension of B. ldb >= max(1, m, n).
outworkComplex*16 array, dimension (max(1, lwork)). On exit, work[0] returns the optimal lwork.
inlworkDimension of work. lwork >= max(1, mn + max(mn, nrhs)). If lwork == -1, workspace query only.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, the i-th diagonal element of the triangular factor of A is zero, so A does not have full rank.
void zgels(
const char* trans,
const INT m,
const INT n,
const INT nrhs,
c128* restrict A,
const INT lda,
c128* restrict B,
const INT ldb,
c128* restrict work,
const INT lwork,
INT* info
);