/home/abui.../sgesvdx.f(3)
β¨ SGESVDX β like, the SVD one π
ok so this is a page from the Library Functions Manual, and bestie, it's a good one. Buckle up π
πΈ NAME
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sgesvdx.f
(yeah that's the whole name, it's giving "my professor named the file after his whole life story" π)
π¦ SYNOPSIS
Functions/Subroutines
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 β¨
π Function/Subroutine Documentation
π subroutine SGESVDX
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)
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. !>
so like β it decomposes your matrix into U, SIGMA, and V, the singular values come back biggest-first, and the eigenvectors route is how it can grab just a subset of them. and bestie, note that last line: it gives you V**T, not V. don't come for me, that's just how it is π«Ά
β¨ Parameters
JOBUβJOBU is CHARACTER*1. Specifies options for computing all or part of the matrix U:= 'V': the first min(m,n) columns of U (the left singular vectors) or as specified by RANGE are returned in the array U;= 'N': no columns of U (no left singular vectors) are computed.
JOBVTβJOBVT is CHARACTER*1. Specifies options for computing all or part of the matrix V**T:= 'V': the first min(m,n) rows of V**T (the right singular vectors) or as specified by RANGE are returned in the array VT;= 'N': no rows of V**T (no right singular vectors) are computed.
RANGEβRANGE is CHARACTER*1, the range selector, lowkey the main character here:= 'A': all singular values will be found.= 'V': all singular values in the half-open interval (VL,VU] will be found.= 'I': the IL-th through IU-th singular values will be found.
MβM is INTEGER. The number of rows of the input matrix A.M >= 0.NβN is INTEGER. The number of columns of the input matrix A.N >= 0.AβA is REAL array, dimension (LDA,N). On entry, the M-by-N matrix A. On exit, the contents of A are destroyed π (fr, it's gone, don't look for it).LDAβLDA is INTEGER. The leading dimension of the array A.LDA >= max(1,M).VLβVL is REAL. IfRANGE='V', the lower bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.VUβVU is REAL. IfRANGE='V', the upper bound of the interval to be searched for singular values.VU > VL. Not referenced ifRANGE = 'A'or'I'.ILβIL is 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βIU is 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'.NSβNS is 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βS is REAL array, dimension (min(M,N)). The singular values of A, sorted so thatS(i) >= S(i+1). πUβU is REAL array, dimension (LDU,UCOL). IfJOBU = 'V', U contains columns of U (the left singular vectors, stored columnwise) as specified by RANGE; ifJOBU = 'N', U is not referenced.
Note: The user must ensure thatUCOL >= NS; ifRANGE = 'V', the exact value of NS is not known in advance and an upper bound must be used. β οΈ
LDUβLDU is INTEGER. The leading dimension of the array U.LDU >= 1; ifJOBU = 'V',LDU >= M.VTβVT is REAL array, dimension (LDVT,N). IfJOBVT = 'V', VT contains the rows of V**T (the right singular vectors, stored rowwise) as specified by RANGE; ifJOBVT = 'N', VT is not referenced.
Note: The user must ensure thatLDVT >= NS; ifRANGE = 'V', the exact value of NS is not known in advance and an upper bound must be used. β οΈ
LDVTβLDVT is INTEGER. The leading dimension of the array VT.LDVT >= 1; ifJOBVT = 'V',LDVT >= NS(see above).WORKβWORK is REAL array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimal LWORK.LWORKβLWORK is INTEGER. The dimension of the array WORK. Sizing rules, literally: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, LWORK should 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. π§ (the classic "just tell me how much space u need" move)
IWORKβIWORK is INTEGER array, dimension (12*MIN(M,N)). IfINFO = 0, the first NS elements of IWORK are zero. IfINFO > 0, then IWORK contains the indices of the eigenvectors that failed to converge in SBDSVDX/SSTEVX.INFOβINFO is INTEGER:= 0: successful exit β¨< 0: ifINFO = -i, the i-th argument had an illegal value π> 0: ifINFO = i, then i eigenvectors failed to converge in SBDSVDX/SSTEVX; ifINFO = N*2 + 1, an internal error occurred in SBDSVDX π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 260 of file sgesvdx.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole thing, bestie. slay. π β¨
LAPACK β Version 3.12.0 β /home/abui.../sgesvdx.f(3) π¦πΈ
π¦ 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