gelst#

Functions

void sgelst(
    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
);
void sgelst(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)#

SGELST 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 with compact WY representation of Q.

It is assumed that A has full rank.

Parameters

in
trans

= ‘N’: the linear system involves A; = ‘T’: the linear system involves A**T.

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

Double precision array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the factors from QR or LQ factorization.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
B

Double precision array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, the solution matrix X.

in
ldb

The leading dimension of the array B. ldb >= max(1, m, n).

out
work

Double precision workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= max(1, mn + max(mn, nrhs)). If lwork = -1, then a workspace query is assumed.

out
info

  • = 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 is zero.

Functions

void dgelst(
    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
);
void dgelst(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)#

DGELST 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 with compact WY representation of Q.

It is assumed that A has full rank.

Parameters

in
trans

= ‘N’: the linear system involves A; = ‘T’: the linear system involves A**T.

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

Double precision array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the factors from QR or LQ factorization.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
B

Double precision array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, the solution matrix X.

in
ldb

The leading dimension of the array B. ldb >= max(1, m, n).

out
work

Double precision workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= max(1, mn + max(mn, nrhs)). If lwork = -1, then a workspace query is assumed.

out
info

  • = 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 is zero.

Functions

void cgelst(
    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
);
void cgelst(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)#

CGELST 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 with compact WY representation of Q.

It is assumed that A has full rank.

Parameters

in
trans

= ‘N’: the linear system involves A; = ‘C’: the linear system involves A**H.

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

Single complex array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the factors from QR or LQ factorization.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
B

Single complex array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, the solution matrix X.

in
ldb

The leading dimension of the array B. ldb >= max(1, m, n).

out
work

Single complex workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= max(1, mn + max(mn, nrhs)). If lwork = -1, then a workspace query is assumed.

out
info

  • = 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 is zero.

Functions

void zgelst(
    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
);
void zgelst(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)#

ZGELST 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 with compact WY representation of Q.

It is assumed that A has full rank.

Parameters

in
trans

= ‘N’: the linear system involves A; = ‘C’: the linear system involves A**H.

in
m

The number of rows of the matrix A. m >= 0.

in
n

The number of columns of the matrix A. n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

Double complex array, dimension (lda, n). On entry, the M-by-N matrix A. On exit, the factors from QR or LQ factorization.

in
lda

The leading dimension of the array A. lda >= max(1, m).

inout
B

Double complex array, dimension (ldb, nrhs). On entry, the right hand side matrix B. On exit, the solution matrix X.

in
ldb

The leading dimension of the array B. ldb >= max(1, m, n).

out
work

Double complex workspace of size (max(1, lwork)). On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of the array work. lwork >= max(1, mn + max(mn, nrhs)). If lwork = -1, then a workspace query is assumed.

out
info

  • = 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 is zero.