gesvdx(3)
π NAME π
Okay so the manual page is gesvdx(3), and the name line is literally:
gesvdx - gesvdx: SVD, bisection
That's it. That's the whole name section. Short king. π
β¨ SYNOPSIS β¨
πΈ Functions
cgesvdx
subroutine cgesvdx (jobu, jobvt, range, m, n, a, lda, vl, vu, il, iu,
ns, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info)
CGESVDX computes the singular value decomposition (SVD) for GE matrices π¦
dgesvdx
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 β
sgesvdx
subroutine sgesvdx (jobu, jobvt, range, m, n, a, lda, vl, vu, il, iu,
ns, s, u, ldu, vt, ldvt, work, lwork, iwork, info)
SGESVDX computes the singular value decomposition (SVD) for GE matrices π
zgesvdx
subroutine zgesvdx (jobu, jobvt, range, m, n, a, lda, vl, vu, il, iu,
ns, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info)
ZGESVDX computes the singular value decomposition (SVD) for GE matrices π
Fr fr, that's four routines βcandzare your complex girlies,sanddare the real ones β and every single one of them is computing an SVD of a GE matrix. Same energy, different precision. iykyk.
π¦ DETAILED DESCRIPTION π¦
π Function Documentation π
subroutine cgesvdx
subroutine cgesvdx (character jobu, character jobvt, character range,
integer m, integer n, complex, dimension( lda, * ) a, integer lda, real
vl, real vu, integer il, integer iu, integer ns, real, dimension( * ) s,
complex, dimension( ldu, * ) u, integer ldu, complex, dimension( ldvt, *
) vt, integer ldvt, complex, dimension( * ) work, integer lwork, real,
dimension( * ) rwork, integer, dimension( * ) iwork, integer info)
CGESVDX computes the singular value decomposition (SVD) for GE matrices β that's the one-liner, bestie. Now the real tea:
πΈ Purpose
Okay so, lowkey the whole point: CGESVDX computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors. The SVD is written
A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A β they are real and non-negative, and they come back in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. π«Ά
And here's the iconic part: CGESVDX uses an eigenvalue problem for obtaining the SVD, which allows for the computation of a subset of singular values and vectors. See SBDSVDX for details. β¨
β οΈ Note that the routine returnsV**T, notV. Do not come for me, that's just how it is. π
π Parameters
JOBUβ isCHARACTER*1. 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β isCHARACTER*1. 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β isCHARACTER*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β isINTEGER. The number of rows of the input matrixA.M >= 0.Nβ isINTEGER. The number of columns of the input matrixA.N >= 0.Aβ isCOMPLEXarray, dimension(LDA,N). On entry, the M-by-N matrixA. On exit, the contents ofAare destroyed. πLDAβ isINTEGER. The leading dimension of the arrayA.LDA >= max(1,M).VLβ isREAL. IfRANGE='V', the lower bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.VUβ isREAL. IfRANGE='V', the upper bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.ILβ isINTEGER. 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β isINTEGER. 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β isINTEGER. 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β isREALarray, dimension(min(M,N)). The singular values of A, sorted so thatS(i) >= S(i+1). βUβ isCOMPLEXarray, 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 that
UCOL >= NS; ifRANGE = 'V', the exact value ofNSis not known in advance and an upper bound must be used. Plan ahead bestie, that's the whole vibe.
- Note: The user must ensure that
LDUβ isINTEGER. The leading dimension of the arrayU.LDU >= 1; ifJOBU = 'V',LDU >= M.VTβ isCOMPLEXarray, 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 that
LDVT >= NS; ifRANGE = 'V', the exact value ofNSis not known in advance and an upper bound must be used.
- Note: The user must ensure that
LDVTβ isINTEGER. The leading dimension of the arrayVT.LDVT >= 1; ifJOBVT = 'V',LDVT >= NS(see above).WORKβ isCOMPLEXarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. β¨LWORKβ isINTEGER. 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(M much larger than N)PATH 1t(N much larger than M)
LWORK >= MAX(1,MIN(M,N)*2+MAX(M,N))for the other paths.- For good performance,
LWORKshould generally be larger. - If
LWORK = -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. π§
RWORKβ isREALarray, dimension(MAX(1,LRWORK)).LRWORK >= MIN(M,N)*(MIN(M,N)*2+15*MIN(M,N)). πIWORKβ isINTEGERarray, dimension(12*MIN(M,N)). IfINFO = 0, the firstNSelements ofIWORKare zero. IfINFO > 0, thenIWORKcontains the indices of the eigenvectors that failed to converge inSBDSVDX/SSTEVX.INFOβ isINTEGER:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value> 0: ifINFO = i, then i eigenvectors failed to converge inSBDSVDX/SSTEVX.- if
INFO = N*2 + 1, an internal error occurred inSBDSVDXπ
- if
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Definition at line 267 of file cgesvdx.f.
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 π¦
πΈ Purpose
DGESVDX computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors. The SVD is written
A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which 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 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 the B β real girlie gets DBDSVDX, not SBDSVDX. Slay.) β¨
β οΈ Note that the routine returnsV**T, notV. Again. Same disclaimer. It's giving consistent. π
π Parameters
JOBU
JOBUβCHARACTER*1, bestie, it decides your whole U situation:'V'β the firstmin(m,n)columns of U (the left singular vectors), or whateverRANGEsays, come back in the arrayU;'N'β no columns of U, zero left singular vectors, we simply do not compute them.
JOBVTβCHARACTER*1, same energy but forV**T:'V'β the firstmin(m,n)rows ofV**T(the right singular vectors), or as specified byRANGE, get returned in the arrayVT;'N'β no rows ofV**T, no right singular vectors, not computed, periodt.
RANGEβCHARACTER*1, the "what do we even want" switch:'A'β all singular values will be found. All of them. Every last one. π'V'β all singular values in the half-open interval(VL,VU]will be found. (Half-open, soVLis out andVUis in β iykyk.)'I'β theIL-th throughIU-th singular values will be found.
MβINTEGER, the number of rows of the input matrix A. Constraint:M >= 0.NβINTEGER, the number of columns of the input matrix A. Constraint:N >= 0.AβDOUBLE PRECISIONarray, dimension(LDA,N). On entry it holds theM-by-Nmatrix A. On exit? the contents of A are destroyed π so don't come crying to me if you needed them, back them up first.LDAβINTEGER, the leading dimension of the array A. Constraint:LDA >= max(1,M).VLβDOUBLE PRECISION. IfRANGE='V', this is the lower bound of the interval to be searched for singular values, andVU > VL. Not referenced at all ifRANGE = 'A'or'I'.VUβDOUBLE PRECISION. IfRANGE='V', this is the upper bound of the interval to be searched for singular values, andVU > VL. Not referenced at all ifRANGE = 'A'or'I'.ILβINTEGER. IfRANGE='I', the index of the smallest singular value to be returned. Constraint:1 <= IL <= IU <= min(M,N), ifmin(M,N) > 0. Not referenced ifRANGE = 'A'or'V'.IUβINTEGER. IfRANGE='I', the index of the largest singular value to be returned. Constraint:1 <= IL <= IU <= min(M,N), ifmin(M,N) > 0. Not referenced ifRANGE = 'A'or'V'.NSβINTEGER, the total number of singular values found, with0 <= NS <= min(M,N). IfRANGE = 'A', thenNS = min(M,N); ifRANGE = 'I', thenNS = IU-IL+1. Cute little tally of what you actually got πSβDOUBLE PRECISIONarray, dimension(min(M,N)). The singular values of A, sorted so thatS(i) >= S(i+1)β descending, the way nature intended. π₯UβDOUBLE PRECISIONarray, dimension(LDU,UCOL). IfJOBU = 'V',Ucontains columns of U (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. No cap, you gotta over-provision. π«Ά
LDUβINTEGER, the leading dimension of the array U.LDU >= 1; and ifJOBU = 'V', thenLDU >= M.VTβDOUBLE PRECISIONarray, 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. Same deal, bestie. π
LDVTβINTEGER, the leading dimension of the array VT.LDVT >= 1; and ifJOBVT = 'V', thenLDVT >= NS(see above, don't make me repeat myself π ).WORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0, thenWORK(1)returns the optimalLWORK. Literally a little receipt of good advice. β¨LWORKβINTEGER, the dimension of the array WORK. Here's the whole tea:LWORK >= MAX(1,MIN(M,N)*(MIN(M,N)+4))for the paths (see comments inside the code):PATH 1(M much larger than N)PATH 1t(N much larger than M)
LWORK >= MAX(1,MIN(M,N)*2+MAX(M,N))for the other paths.- For good performance,
LWORKshould generally be larger. Bigger workspace = happier routine, ngl.
IfLWORK = -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 toLWORKis issued byXERBLA. Iconic little shortcut, no notes. π
IWORKβINTEGERarray, 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. So when stuff goes sideways, this is your little list of who didn't show up. π«INFOβINTEGER, the vibe check at the end:= 0: successful exit, slay. π< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = i, then i eigenvectors failed to converge inDBDSVDX/DSTEVX. And ifINFO = N*2 + 1, an internal error occurred inDBDSVDX. Not us, not our fault, but still. π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 260 of file dgesvdx.f.
π subroutine sgesvdx (character jobu, character jobvt, character range, integer m, integer n, real, dimension( lda, * ) a, integer lda, real vl, real vu, integer il, integer iu, integer ns, real, dimension( * ) s, real, dimension( ldu, * ) u, integer ldu, real, dimension( ldvt, * ) vt, integer ldvt, real, dimension( * ) work, integer lwork, integer, dimension( * ) iwork, integer info)
oooh okay now we're on the single-precision sister. She's literally titled:
SGESVDX computes the singular value decomposition (SVD) for GE matrices
π¦ Purpose:
!>
!> SGESVDX computes the singular value decomposition (SVD) of a real
!> M-by-N matrix A, optionally computing the left and/or right singular
!> vectors. The SVD is written
!>
!> A = U * SIGMA * transpose(V)
!>
!> where SIGMA is an M-by-N matrix which 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
!> are returned in descending order. The first min(m,n) columns of
!> U and V are the left and right singular vectors of A.
!>
!> SGESVDX uses an eigenvalue problem for obtaining the SVD, which
!> allows for the computation of a subset of singular values and
!> vectors. See SBDSVDX for details.
!>
!> Note that the routine returns V**T, not V.
!>
Translating from math to group chat: SIGMA is M-by-N and is literally just zeros everywhere except its min(m,n) diagonal elements. U is M-by-M orthogonal, V is N-by-N orthogonal. The diagonal of SIGMA = the singular values of A, they're real and non-negative, and they come back in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
SGESVDX gets its SVD from an eigenvalue problem, which is the whole reason it can hand you just a subset of singular values and vectors instead of the entire buffet. See SBDSVDX for the details, bestie.
Note that the routine returns V**T, not V. She said what she said. π
β¨ Parameters
JOBUβCHARACTER*1, specifies options for computing all or part of the matrix U:'V'β the firstmin(m,n)columns of U (the left singular vectors), or as specified byRANGE, are returned in the arrayU;'N'β no columns of U (no left singular vectors) are computed.
JOBVTβCHARACTER*1, 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 byRANGE, are returned in the arrayVT;'N'β no rows ofV**T(no right singular vectors) are computed.
RANGEβCHARACTER*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βINTEGER, the number of rows of the input matrix A.M >= 0.NβINTEGER, the number of columns of the input matrix A.N >= 0.AβREALarray, dimension(LDA,N). On entry, theM-by-Nmatrix A. On exit, the contents of A are destroyed. π Same warning, single precision this time.LDAβINTEGER, the leading dimension of the array A.LDA >= max(1,M).VLβREAL. IfRANGE='V', the lower bound of the interval to be searched for singular values, withVU > VL. Not referenced ifRANGE = 'A'or'I'.VUβREAL. IfRANGE='V', the upper bound of the interval to be searched for singular values, withVU > VL. Not referenced ifRANGE = 'A'or'I'.ILβINTEGER. 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βINTEGER. 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'.NSNS(INTEGER) β the total number of singular values found, and the range is0 <= NS <= min(M,N). IfRANGE = 'A'thenNS = min(M,N); ifRANGE = 'I'thenNS = IU-IL+1. πS(REAL array, dimension(min(M,N))) β the singular values ofA, sorted so thatS(i) >= S(i+1). Descending order, bestie, biggest first β¨U(REAL 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. Like, you literally cannot know it yet, so budget high πLDU(INTEGER) β the leading dimension of the arrayU.LDU >= 1; ifJOBU = 'V',LDU >= M. π«ΆVT(REAL 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. Same energy as above, no cap πLDVT(INTEGER) β the leading dimension of the arrayVT.LDVT >= 1; ifJOBVT = 'V',LDVT >= NS(see above, bestie, it's all connected π).WORK(REAL array, dimension(MAX(1,LWORK))) β on exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πΈLWORK(INTEGER) β 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(M much larger than N)PATH 1t(N much larger than M)
and LWORK >= MAX(1,MIN(M,N)*2+MAX(M,N)) for the other paths. For good performance, LWORK should generally be larger β treat the minimum as a floor, not a goal, okurrr π
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. It's giving "just window shopping, not buying" ποΈ
IWORK(INTEGER array, dimension(12*MIN(M,N))) β ifINFO = 0, the firstNSelements ofIWORKare zero. IfINFO > 0, thenIWORKcontains the indices of the eigenvectors that failed to converge inSBDSVDX/SSTEVX. π¨INFO(INTEGER)= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π¬> 0: ifINFO = i, thenieigenvectors failed to converge inSBDSVDX/SSTEVX. IfINFO = N*2 + 1, an internal error occurred inSBDSVDX. π
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Definition
Definition at line 260 of file sgesvdx.f.
π¦ subroutine zgesvdx
Okay so here's the complex-arithmetic twin, and the signature is a whole mood:
subroutine zgesvdx (character jobu, character jobvt, character range,
integer m, integer n, complex*16, dimension( lda, * ) a, integer lda,
double precision vl, double precision vu, integer il, integer iu,
integer ns, double precision, dimension( * ) s, complex*16, dimension(
ldu, * ) u, integer ldu, complex*16, dimension( ldvt, * ) vt, integer
ldvt, complex*16, dimension( * ) work, integer lwork, double precision,
dimension( * ) rwork, integer, dimension( * ) iwork, integer info)
ZGESVDX computes the singular value decomposition (SVD) for GE matrices
π« Purpose
ZGESVDX computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors. The SVD is written
A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. πβ¨
ZGESVDX 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 that the routine returnsV**T, notV. Read that twice, bestie β it's the number one gotcha here π
πΈ Parameters π
JOBU(CHARACTER1)* β 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(CHARACTER1)* β 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(CHARACTER1)*= '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(INTEGER) β the number of rows of the input matrixA.M >= 0.N(INTEGER) β the number of columns of the input matrixA.N >= 0.A(COMPLEX16 array, dimension(LDA,N))* β on entry, the M-by-N matrixA. On exit, the contents ofAare destroyed. RIP your input, it's gone πͺ¦πLDA(INTEGER) β the leading dimension of the arrayA.LDA >= max(1,M).VL(DOUBLE PRECISION) β ifRANGE='V', the lower bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.VU(DOUBLE PRECISION) β ifRANGE='V', the upper bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'. So like, keep them in the right order or it's a vibe check fail πIL(INTEGER) β 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(INTEGER) β 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'. Yes, same bounds, they're a matching set πNS(INTEGER) β 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(DOUBLE PRECISION array, dimension(min(M,N))) β the singular values ofA, sorted so thatS(i) >= S(i+1). Descending, always descending πU(COMPLEX16 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(INTEGER) β the leading dimension of the arrayU.LDU >= 1; ifJOBU = 'V',LDU >= M.VT(COMPLEX16 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(INTEGER) β the leading dimension of the arrayVT.LDVT >= 1; ifJOBVT = 'V',LDVT >= NS(see above).WORK(COMPLEX16 array, dimension(MAX(1,LWORK)))* β on exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πLWORK(INTEGER) β 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(M much larger than N)PATH 1t(N much larger than M)
and LWORK >= MAX(1,MIN(M,N)*2+MAX(M,N)) for the other paths. For good performance, LWORK should generally be larger β bigger is literally better here, no cap π₯
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. π§
RWORK(DOUBLE PRECISION array, dimension(MAX(1,LRWORK))) βLRWORK >= MIN(M,N)*(MIN(M,N)*2+15*MIN(M,N)). Yes that's a lot ofMIN(M,N), it's giving maximalist πIWORKIWORKβ INTEGER array, dimension(12*MIN(M,N))
bestie listen up π«Ά if INFO = 0, the first NS elements of IWORK are zero (all good, no notes β¨). But if INFO > 0, then IWORK is holding the indices of the eigenvectors that failed to converge in DBDSVDX/DSTEVX β like, it's literally snitching on exactly which ones ghosted you π
INFOβ INTEGER, the vibe check at the end of the whole thing:= 0: successful exit π slay, we're done, everything converged, main character energy< 0: ifINFO = -i, the i-th argument had an illegal value π so likeβ¦ check your inputs, girl> 0: ifINFO = i, then i eigenvectors failed to converge inDBDSVDX/DSTEVXπ not everything can be iconic- and if
INFO = N*2 + 1, an internal error occurred inDBDSVDXβ that one's not on you, that's a whole system situation π
- and if
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
fr fr the academic royalty behind this whole thing π four institutions, one legendary routine
Definition at line 267 of file zgesvdx.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
okay that's the whole page bestie, you made it to the end π¦π
no cap, this was the longest one and you ate every single flag, every INFO code, every author credit β literally zero skips, zero crumbs left behind β¨ go drink some water and go call gesvdx with confidence π
LAPACK β Version 3.12.0 β gesvdx(3) πΈ that's the source and version right there, straight from the page's footer, mwah π«Ά
π¦ 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