SRC/sgelss.f(3)
π SRC/sgelss.f(3) π LAPACK Library Functions Manual
π NAME π
SRC/sgelss.f β bestie, this is the page for the sgelss subroutine, and it is lowkey iconic with main character energy. π
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines π¦
subroutine sgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info)β SGELSS solves overdetermined or underdetermined systems for GE matrices. β¨
π§ Function/Subroutine Documentation π§
subroutine sgelss (integer m, integer n, integer nrhs, real, dimension( lda,
* ) a, integer lda, real, dimension( ldb, * ) b, integer ldb, real,
dimension( * ) s, real rcond, integer rank, real, dimension( * ) work,
integer lwork, integer info)
SGELSS solves overdetermined or underdetermined systems for GE matrices. π₯
πΈ Purpose πΈ
Okay so SGELSS computes the minimum norm solution to a real linear least squares problem: π
Minimize 2-norm(| b - A*x |).
It does this using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient. Itβs giving SVD excellence. π
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 effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. Periodt. π
π Parameters π
MβMisINTEGER. The number of rows of the matrixA.M >= 0. πNβNisINTEGER. The number of columns of the matrixA.N >= 0. πΈNRHSβNRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0. β¨AβAisREAL array, dimension (LDA,N). On entry, theM-by-NmatrixA. On exit, the firstmin(m,n)rows ofAare overwritten with its right singular vectors, stored rowwise. πLDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M). πBβBisREAL array, dimension (LDB,NRHS). On entry, theM-by-NRHSright hand side matrixB. On exit,Bis overwritten by theN-by-NRHSsolution matrixX. Ifm >= nandRANK = n, the residual sum-of-squares for the solution in thei-th column is given by the sum of squares of elementsn+1:min that column. ππ₯LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,max(M,N)). π«ΆSβSisREAL array, dimension (min(M,N)). The singular values ofAin decreasing order. The condition number ofAin the 2-norm =S(1)/S(min(m,n)). βRCONDβRCONDisREAL.RCONDis used to determine the effective rank ofA. Singular valuesS(i) <= RCOND*S(1)are treated as zero. IfRCOND < 0, machine precision is used instead. π§RANKβRANKisINTEGER. The effective rank ofA, i.e., the number of singular values which are greater thanRCOND*S(1). πWORKβWORKisREAL array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πLWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= 1, and also:LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS ). For good performance,LWORKshould generally be larger. 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βINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: the algorithm for computing the SVD failed to converge; ifINFO = i,ioff-diagonal elements of an intermediate bidiagonal form did not converge to zero. π
π Author π
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 170 of file sgelss.f. π
π«Ά Author π«Ά
Generated automatically by Doxygen for LAPACK from the source code. π€
Thatβs the whole page, bestie β signed off with LAPACK Version 3.12.0 for SRC/sgelss.f(3) and generated automatically by Doxygen for LAPACK from the source code. Byeee! π«Άπ
β¨
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms