SRC/dgesvdx.f(3)
hey bestie π welcome to SRC/dgesvdx.f(3) β the LAPACK page for dgesvdx, aka the SVD subroutine that said βlet me cookβ and then cooked. β¨
π NAME
SRC/dgesvdx.f β thatβs the name, no cap π«Ά
β¨ SYNOPSIS
π«Ά Functions/Subroutines
subroutine dgesvdx(jobu,jobvt,range,m,n,a,lda,vl,vu,il,iu,ns,s,u,ldu,vt,ldvt,work,lwork,iwork,info) βDGESVDXcomputes the singular value decomposition (SVD) for GE matrices π
subroutine dgesvdx (jobu, jobvt, range, m, n, a, lda, vl, vu, il, iu,
ns, s, u, ldu, vt, ldvt, work, lwork, iwork, info)
DGESVDX computes the singular value decomposition (SVD) for GE
matrices
π Function/Subroutine Documentation
π§ subroutine dgesvdx
subroutine dgesvdx (character jobu, character jobvt, character range,
integer m, integer n, double precision, dimension( lda, * ) a, integer
lda, double precision vl, double precision vu, integer il, integer iu,
integer ns, double precision, dimension( * ) s, double precision,
dimension( ldu, * ) u, integer ldu, double precision, dimension( ldvt, *
) vt, integer ldvt, double precision, dimension( * ) work, integer
lwork, integer, dimension( * ) iwork, integer info)
DGESVDX computes the singular value decomposition (SVD) for GE matrices. Iconic. π
π Purpose
okay so hereβs the tea, bestie β: DGESVDX computes the singular value decomposition (SVD) of a real M-by-N matrix A, and it can optionally compute the left and/or right singular vectors. The SVD is written like this:
A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix that is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and they are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. πΈ
DGESVDX uses an eigenvalue problem for obtaining the SVD, which allows for the computation of a subset of singular values and vectors. See DBDSVDX for details. π
note note note: the routine returnsV**T, notV. periodt. π
π Parameters
JOBUβJOBUisCHARACTER*1and specifies options for computing all or part of the matrixU:= 'V': the firstmin(m,n)columns ofU(the left singular vectors) or as specified byRANGEare returned in the arrayU;= 'N': no columns ofU(no left singular vectors) are computed.
JOBVTβJOBVTisCHARACTER*1and specifies options for computing all or part of the matrixV**T:= 'V': the firstmin(m,n)rows ofV**T(the right singular vectors) or as specified byRANGEare returned in the arrayVT;= 'N': no rows ofV**T(no right singular vectors) are computed.
RANGEβRANGEisCHARACTER*1:= 'A': all singular values will be found.= 'V': all singular values in the half-open interval(VL,VU]will be found.= 'I': theIL-th throughIU-th singular values will be found.
MβMisINTEGER. The number of rows of the input matrixA.M >= 0.NβNisINTEGER. The number of columns of the input matrixA.N >= 0.AβAisDOUBLE PRECISION array, dimension (LDA,N). On entry, theM-by-NmatrixA. On exit, the contents ofAare destroyed. πLDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).VLβVLisDOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.VUβVUisDOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.ILβILisINTEGER. IfRANGE='I', the index of the smallest singular value to be returned.1 <= IL <= IU <= min(M,N), ifmin(M,N) > 0. Not referenced ifRANGE = 'A'or'V'.IUβIUisINTEGER. IfRANGE='I', the index of the largest singular value to be returned.1 <= IL <= IU <= min(M,N), ifmin(M,N) > 0. Not referenced ifRANGE = 'A'or'V'.NSβNSisINTEGER. The total number of singular values found,0 <= NS <= min(M,N). IfRANGE = 'A',NS = min(M,N); ifRANGE = 'I',NS = IU-IL+1.SβSisDOUBLE PRECISION array, dimension (min(M,N)). The singular values ofA, sorted so thatS(i) >= S(i+1). β¨UβUisDOUBLE PRECISION array, dimension (LDU,UCOL). IfJOBU = 'V',Ucontains columns ofU(the left singular vectors, stored columnwise) as specified byRANGE; ifJOBU = 'N',Uis not referenced. Note: the user must ensure thatUCOL >= NS; ifRANGE = 'V', the exact value ofNSis not known in advance and an upper bound must be used. π«ΆLDUβLDUisINTEGER. The leading dimension of the arrayU.LDU >= 1; ifJOBU = 'V',LDU >= M.VTβVTisDOUBLE PRECISION array, dimension (LDVT,N). IfJOBVT = 'V',VTcontains the rows ofV**T(the right singular vectors, stored rowwise) as specified byRANGE; ifJOBVT = 'N',VTis not referenced. Note: the user must ensure thatLDVT >= NS; ifRANGE = 'V', the exact value ofNSis not known in advance and an upper bound must be used. πLDVTβLDVTisINTEGER. The leading dimension of the arrayVT.LDVT >= 1; ifJOBVT = 'V',LDVT >= NS(see above).WORKβWORKisDOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK;LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= MAX(1,MIN(M,N)*(MIN(M,N)+4))for the paths (see comments inside the code):PATH 1(Mmuch larger thanN)PATH 1t(Nmuch larger thanM)
LWORK >= MAX(1,MIN(M,N)*2+MAX(M,N))for the other paths.- 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. bestie, thatβs the βjust tell me the sizeβ mode π
IWORKβIWORKisINTEGER array, dimension (12*MIN(M,N)). IfINFO = 0, the firstNSelements ofIWORKare zero. IfINFO > 0, thenIWORKcontains the indices of the eigenvectors that failed to converge inDBDSVDX/DSTEVX.INFOβINFOisINTEGER:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, thenieigenvectors failed to converge inDBDSVDX/DSTEVX. IfINFO = N*2 + 1, an internal error occurred inDBDSVDXπ
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 260 of file dgesvdx.f.
π¦ Author
Generated automatically by Doxygen for LAPACK from the source code.
okay bestie, thatβs the whole vibe check π footer deets: LAPACK, Version 3.12.0, page SRC/dgesvdx.f(3). No extra date was printed on this page, so Iβm not inventing one β¨π
π¦ 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