SGELSY(3)
π¦ SGELSY(3) β the sgelsy.f page π¦
okay so bestie, this is the manual page for sgelsy.f(3) from the Library Functions Manual π
it is literally about SGELSY, the subroutine that solves overdetermined or underdetermined systems for GE matrices. no cap.
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sgelsy.f β yes, that whole path is the name, periodt.
β¨ SYNOPSIS β¨
π Functions/Subroutines π
subroutine SGELSY (m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
SGELSY solves overdetermined or underdetermined systems for GE matrices.
π§ Function/Subroutine Documentation π§
subroutine SGELSY (integer m, integer n, integer nrhs, real, dimension( lda,
* ) a, integer lda, real, dimension( ldb, * ) b, integer ldb, integer,
dimension( * ) jpvt, real rcond, integer rank, real, dimension( * )
work, integer lwork, integer info)
SGELSY solves overdetermined or underdetermined systems for GE matrices.
π Purpose π
SGELSY computes the minimum-norm solution to a real linear least squares problem:
minimize || A * X - B ||
using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient.
Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
The routine first computes a QR factorization with column pivoting:
A * P = Q * [ R11 R12 ]
[ 0 R22 ]
with R11 defined as the largest leading submatrix whose estimated condition number is less than 1/RCOND. The order of R11, RANK, is the effective rank of A.
Then, R22 is considered to be negligible, and R12 is annihilated by orthogonal transformations from the right, arriving at the complete orthogonal factorization:
A * P = Q * [ T11 0 ] * Z
[ 0 0 ]
The minimum-norm solution is then
X = P * Z**T [ inv(T11)*Q1**T*B ]
[ 0 ]
where Q1 consists of the first RANK columns of Q.
This routine is basically identical to the original xGELSX except three differences:
- The call to the subroutine
xGEQPFhas been substituted by the the call to the subroutinexGEQP3. This subroutine is a Blas-3 version of the QR factorization with column pivoting. - Matrix
B(the right hand side) is updated with Blas-3. - The permutation of matrix
B(the right hand side) is faster and more simple.
π Parameters π
MβM is INTEGER; it's the number of rows of the matrixA.M >= 0.NβN is INTEGER; the number of columns of the matrixA.N >= 0.NRHSβNRHS is INTEGER; the number of right hand sides, i.e., the number of columns of matricesBandX.NRHS >= 0.AβA is REAL array, dimension (LDA,N). On entry, theM-by-NmatrixA. On exit,Ahas been overwritten by details of its complete orthogonal factorization.LDAβLDA is INTEGER; the leading dimension of the arrayA.LDA >= max(1,M).BβB is REAL array, dimension (LDB,NRHS). On entry, theM-by-NRHSright hand side matrixB. On exit, theN-by-NRHSsolution matrixX. IfM = 0orN = 0,Bis not referenced.LDBβLDB is INTEGER; the leading dimension of the arrayB.LDB >= max(1,M,N).JPVTβJPVT is INTEGER array, dimension (N). On entry, ifJPVT(i) .ne. 0, thei-th column ofAis permuted to the front ofAP, otherwise columniis a free column. On exit, ifJPVT(i) = k, then thei-th column ofAPwas thek-th column ofA.RCONDβRCOND is REAL.RCONDis used to determine the effective rank ofA, which is defined as the order of the largest leading triangular submatrixR11in the QR factorization with pivoting ofA, whose estimated condition number< 1/RCOND.RANKβRANK is INTEGER; the effective rank ofA, i.e., the order of the submatrixR11. This is the same as the order of the submatrixT11in the complete orthogonal factorization ofA. IfNRHS = 0,RANK = 0on output.WORKβWORK is REAL array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORK is INTEGER; the dimension of the arrayWORK. The unblocked strategy requires that:LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ), whereMN = min( M, N ). The block algorithm requires that:LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ), whereNBis an upper bound on the blocksize returned byILAENVfor the routinesSGEQP3,STZRZF,STZRQF,SORMQR, andSORMRZ. IfLWORK = -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.INFOβINFO is INTEGER:= 0: successful exit;< 0: If INFO = -i, the i-th argument had an illegal value.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Contributors: π
- A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
- E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
- G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
π Definition π
Definition at line 204 of file sgelsy.f.
π€ Author (auto-generated) π€
Generated automatically by Doxygen for LAPACK from the source code.
πΈ that's the whole page, bestie β the footer gives LAPACK Version 3.12.0 and the path /home/abui...RC/sgelsy.f(3). π
π¦ 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