SRC/dgelss.f(3)
SRC/dgelss.f(3) π β Library Functions Manual β¨
okay bestie, welcome to the SRC/dgelss.f page. The manual name is Library Functions Manual and this whole thing is very βlinear algebra but make it main character energy.β π
NAME π¦
SRC/dgelss.f β that's the name, bestie. Periodt. β¨
SYNOPSIS β¨
Functions/Subroutines π
subroutine dgelss (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work,
lwork, info)
DGELSS solves overdetermined or underdetermined systems for GE matrices. Slay. π«Ά
Function/Subroutine Documentation π
Here's the full signature flex:
subroutine dgelss (integer m, integer n, integer nrhs, double precision,
dimension( lda, * ) a, integer lda, double precision, dimension( ldb, *
) b, integer ldb, double precision, dimension( * ) s, double precision
rcond, integer rank, double precision, dimension( * ) work, integer
lwork, integer info)
DGELSS solves overdetermined or underdetermined systems for GE matrices. π¦
Purpose π
okay so DGELSS 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. Not me loving a rank-deficient icon. π
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. Vibe check: passed. β¨
Parameters π
MβINTEGER. The number of rows of the matrixA.M >= 0.NβINTEGER. The number of columns of the matrixA.N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.AβDOUBLE PRECISIONarray, 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βINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).BβDOUBLE PRECISIONarray, 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βINTEGER. The leading dimension of the arrayB.LDB >= max(1,max(M,N)).SβDOUBLE PRECISIONarray, dimension(min(M,N)). The singular values ofAin decreasing order. The condition number ofAin the 2-norm =S(1)/S(min(m,n)).RCONDβDOUBLE PRECISION.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βINTEGER. The effective rank ofA, i.e., the number of singular values which are greater thanRCOND*S(1).WORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. 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βINTEGER.= 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.
Bestie, pay attention to those INFO codes. They are literally telling you what happened. No cap. π
Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 170 of file dgelss.f. π
Author (auto-generated) π
Generated automatically by Doxygen for LAPACK from the source code.
π and that's the whole page, bestie β source/version: LAPACK Version 3.12.0, file SRC/dgelss.f(3). periodt. π
π¦ 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