DGELSD(3)
π DGELSD(3) β Library Functions Manual π
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dgelsd.f β okay bestie, this is the source file for DGELSD, the routine that computes the minimum-norm solution to a linear least squares problem for GE matrices. π
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
subroutine DGELSD (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info)βDGELSDcomputes the minimum-norm solution to a linear least squares problem for GE matrices.
π Function/Subroutine Documentation π
π«Ά subroutine DGELSD π«Ά
subroutine DGELSD (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, dimension( * ) iwork, integer info)
DGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices. Slay. π
π Purpose π
Okay so picture this: DGELSD 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. And A is an M-by-N matrix which may be rank-deficient β yes, she can still serve even when she's not full rank, no cap. β¨
Several right hand side vectors b and solution vectors x can be handled in a single call. They're stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X. Group chat energy, but for linear algebra. π«Ά
The problem is solved in three steps:
- Reduce the coefficient matrix
Ato bidiagonal form with Householder transformations, reducing the original problem into a(BLS). - Solve the BLS using a divide and conquer approach.
- Apply back all the Householder transformations to solve the original least squares problem.
The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. Iconic behavior. π
πΈ Parameters πΈ
MβMisINTEGER. It's the number of rows ofA. Constraint:M >= 0.NβNisINTEGER. It's the number of columns ofA. Constraint:N >= 0.NRHSβNRHSisINTEGER. It's the number of right hand sides, i.e. the number of columns of the matricesBandX. Constraint:NRHS >= 0.AβAisDOUBLE PRECISION array, dimension (LDA,N). On entry, it's theM-by-NmatrixA. On exit,Ahas been destroyed. π Yes, really β she's gone.LDAβLDAisINTEGER. It's the leading dimension of the arrayA. Constraint:LDA >= max(1,M).BβBisDOUBLE PRECISION array, dimension (LDB,NRHS). On entry, it's 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. It's the leading dimension of the arrayB. Constraint:LDB >= max(1,max(M,N)).SβSisDOUBLE PRECISION array, dimension (min(M,N)). It holds the singular values ofAin decreasing order. The condition number ofAin the 2-norm isS(1)/S(min(m,n)).RCONDβRCONDisDOUBLE PRECISION. It's 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. It's the effective rank ofA, i.e. the number of singular values which are greater thanRCOND*S(1).WORKβWORKisDOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. It's the dimension of the arrayWORK.LWORK must be at least 1. The exact minimum amount of workspace needed depends onM,N, andNRHS. As long asLWORKis at least12*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2,ifMis greater than or equal toN, or at least12*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS + (SMLSIZ+1)**2,ifMis less thanN, the code will execute correctly.SMLSIZis returned byILAENVand is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25), andNLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 ). For good performance,LWORKshould generally be larger.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
IWORKβIWORKisINTEGER array, dimension (MAX(1,LIWORK)).LIWORK >= max(1, 3 * MINMN * NLVL + 11 * MINMN),whereMINMN = MIN( M,N ). On exit, ifINFO = 0,IWORK(1)returns the minimumLIWORK.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 π
Big brain credits go to:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π«Ά Contributors: π«Ά
- Ming Gu and Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA
- Osni Marques, LBNL/NERSC, USA
Definition at line 201 of file dgelsd.f.
π Author π
This page was generated automatically by Doxygen for LAPACK from the source code.
And that's the whole page, bestie β auto-generated by Doxygen for LAPACK from the source code, stamped LAPACK Version 3.12.0 and living at /home/abui...RC/dgelsd.f(3). The footer doesn't print a separate date, just the version stamp β periodt. π
β¨
π¦ 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