SRC/sgesvdx.f(3)
β¨ SRC/sgesvdx.f(3) β¨
Okay bestie, this page is from the Library Functions Manual and itβs the SRC/sgesvdx.f entry β yes, the one and only SGESVDX. Strap in π
π NAME π
SRC/sgesvdx.f
π¦ 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 (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 π₯
Okay so SGESVDX computes the 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 as:
A = U * SIGMA * transpose(V)
Here 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 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 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. Not a typo, bestie β thatβs the whole vibe. π«Ά
π Parameters π
JOBU
JOBU is CHARACTER*1.
Specifies options for computing all or part of the matrix U:
'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
JOBVT is CHARACTER*1.
Specifies options for computing all or part of the matrix V**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
RANGE is 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
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.
LDA
LDA is INTEGER.
The leading dimension of the array A. LDA >= max(1,M).
VL
VL is REAL.
If RANGE='V', the lower bound of the interval to be searched for singular values. VU > VL.
Not referenced if RANGE = 'A' or 'I'.
VU
VU is REAL.
If RANGE='V', the upper bound of the interval to be searched for singular values. VU > VL.
Not referenced if RANGE = 'A' or 'I'.
IL
IL is INTEGER.
If RANGE='I', the index of the smallest singular value to be returned.
1 <= IL <= IU <= min(M,N), if min(M,N) > 0.
Not referenced if RANGE = 'A' or 'V'.
IU
IU is INTEGER.
If RANGE='I', the index of the largest singular value to be returned.
1 <= IL <= IU <= min(M,N), if min(M,N) > 0.
Not referenced if RANGE = 'A' or 'V'.
NS
NS is INTEGER.
The total number of singular values found, 0 <= NS <= min(M,N).
If RANGE = 'A', NS = min(M,N); if RANGE = 'I', NS = IU-IL+1.
S
S is REAL array, dimension (min(M,N)).
The singular values of A, sorted so that S(i) >= S(i+1).
U
U is REAL array, dimension (LDU,UCOL).
If JOBU = 'V', U contains columns of U (the left singular vectors, stored columnwise) as specified by RANGE; if JOBU = 'N', U is not referenced.
Note: The user must ensure that UCOL >= NS; if RANGE = '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; if JOBU = 'V', LDU >= M.
VT
VT is REAL array, dimension (LDVT,N).
If JOBVT = 'V', VT contains the rows of V**T (the right singular vectors, stored rowwise) as specified by RANGE; if JOBVT = 'N', VT is not referenced.
Note: The user must ensure that LDVT >= NS; if RANGE = '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; if JOBVT = 'V', LDVT >= NS (see above).
WORK
WORK is REAL array, dimension (MAX(1,LWORK)).
On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
LWORK
LWORK is INTEGER.
The dimension of the array WORK.
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.
IWORK
IWORK is INTEGER array, dimension (12*MIN(M,N)).
If INFO = 0, the first NS elements of IWORK are zero. If INFO > 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, thei-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 at line 260 of file sgesvdx.f.
πΈ Author πΈ
Generated automatically by Doxygen for LAPACK from the source code.
Okay bestie, thatβs the whole page π β LAPACK Version 3.12.0, file SRC/sgesvdx.f(3). Slay and stay orthogonal β¨
π¦ 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