SGELST(3)
πΈ NAME πΈ
okay bestie, this is the sgelst.f page from the LAPACK manual β a Library Functions Manual moment, fr fr. The actual file path is:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sgelst.f
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine SGELST (trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
the whole vibe: SGELST solves overdetermined or underdetermined systems for GE matrices using QR or LQ factorization with compact WY representation of Q. π«Ά
π¦ Function/Subroutine Documentation π¦
subroutine SGELST (...)
subroutine SGELST (character trans, integer m, integer n, integer nrhs,
real, dimension( lda, * ) a, integer lda, real, dimension( ldb, * ) b,
integer ldb, real, dimension( * ) work, integer lwork, integer info)
SGELST solves overdetermined or underdetermined systems for GE matrices using QR or LQ factorization with compact WY representation of Q. iconic behavior, honestly π
π Purpose π
SGELSTsolves overdetermined or underdetermined real linear systems involving anM-by-NmatrixA, or its transpose, using a QR or LQ factorization ofAwith compact WY representation ofQ.- it is assumed that
Ahas full rank. no cap. - The following options are provided:
- If
TRANS = 'N'andm >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem
- If
minimize || B - A*X ||.
- If
TRANS = 'N'andm < n: find the minimum norm solution of an underdetermined systemA * X = B. - If
TRANS = 'T'andm >= n: find the minimum norm solution of an underdetermined systemA**T * X = B. - If
TRANS = 'T'andm < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem
minimize || B - A**T * X ||.
- Several right hand side vectors
band solution vectorsxcan be handled in a single call; they are stored as the columns of theM-by-NRHSright hand side matrixBand theN-by-NRHSsolution matrixX.
π Parameters π
TRANSβCHARACTER*1= 'N': the linear system involvesA;= 'T': the linear system involvesA**T.
MβINTEGER- The number of rows of the matrix
A.M >= 0.
- The number of rows of the matrix
NβINTEGER- The number of columns of the matrix
A.N >= 0.
- The number of columns of the matrix
NRHSβINTEGER- The number of right hand sides, i.e., the number of columns of the matrices
BandX.NRHS >=0.
- The number of right hand sides, i.e., the number of columns of the matrices
AβREAL array, dimension (LDA,N)- On entry, the
M-by-NmatrixA. - On exit,
- if
M >= N,Ais overwritten by details of its QR factorization as returned bySGEQRT; - if
M < N,Ais overwritten by details of its LQ factorization as returned bySGELQT.
- if
- On entry, the
LDAβINTEGER- The leading dimension of the array
A.LDA >= max(1,M).
- The leading dimension of the array
BβREAL array, dimension (LDB,NRHS)- On entry, the matrix
Bof right hand side vectors, stored columnwise;BisM-by-NRHSifTRANS = 'N', orN-by-NRHSifTRANS = 'T'. - On exit, if
INFO = 0,Bis overwritten by the solution vectors, stored columnwise:- if
TRANS = 'N'andm >= n, rows1tonofBcontain the least squares solution vectors; the residual sum of squares for the solution in each column is given by the sum of squares of elementsN+1toMin that column; - if
TRANS = 'N'andm < n, rows1toNofBcontain the minimum norm solution vectors; - if
TRANS = 'T'andm >= n, rows1toMofBcontain the minimum norm solution vectors; - if
TRANS = 'T'andm < n, rows1toMofBcontain the least squares solution vectors; the residual sum of squares for the solution in each column is given by the sum of squares of elementsM+1toNin that column.
- if
- On entry, the matrix
LDBβINTEGER- The leading dimension of the array
B.LDB >= MAX(1,M,N).
- The leading dimension of the array
WORKβREAL array, dimension (MAX(1,LWORK))- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKβINTEGER- The dimension of the array
WORK. LWORK >= max( 1, MN + max( MN, NRHS ) ).- For optimal performance,
LWORK >= max( 1, (MN + max( MN, NRHS ))*NB ). - where
MN = min(M,N)andNBis the optimum block size. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
- The dimension of the array
INFOβINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, thei-th diagonal element of the triangular factor ofAis zero, so thatAdoes not have full rank; the least squares solution could not be computed.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Contributors π
November 2022, Igor Kozachenko,Computer Science Division,University of California, Berkeley
Definition at line 192 of file sgelst.f.
π«Ά Author π«Ά
Generated automatically by Doxygen for LAPACK from the source code.
β¨ okay bye bestie β this page is from LAPACK, Version 3.12.0, and the footer points at /home/abui...RC/sgelst.f(3). slay. π
π
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms