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 β€” c and z are your complex girlies, s and d are 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 returns V**T, not V. Do not come for me, that's just how it is. πŸ’€

πŸ’… Parameters

  • 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 β€” 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 β€” 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': the IL-th through IU-th singular values will be found.
  • M β€” is INTEGER. The number of rows of the input matrix A. M >= 0.
  • N β€” is INTEGER. The number of columns of the input matrix A. N >= 0.
  • A β€” is COMPLEX array, dimension (LDA,N). On entry, the M-by-N matrix A. On exit, the contents of A are destroyed. πŸ™ˆ
  • LDA β€” is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
  • 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 β€” 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 β€” 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 β€” 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 β€” 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 β€” is REAL array, dimension (min(M,N)). The singular values of A, sorted so that S(i) >= S(i+1). ⭐
  • U β€” is COMPLEX 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. Plan ahead bestie, that's the whole vibe.
  • LDU β€” is INTEGER. The leading dimension of the array U. LDU >= 1; if JOBU = 'V', LDU >= M.
  • VT β€” is COMPLEX 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 β€” is INTEGER. The leading dimension of the array VT. LDVT >= 1; if JOBVT = 'V', LDVT >= NS (see above).
  • WORK β€” is COMPLEX array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal 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. 🧚
  • RWORK β€” is REAL array, dimension (MAX(1,LRWORK)). LRWORK >= MIN(M,N)*(MIN(M,N)*2+15*MIN(M,N)). πŸ“
  • 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 β€” is INTEGER:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value
    • > 0: if INFO = i, then i eigenvectors failed to converge in SBDSVDX/SSTEVX.
      • if INFO = 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 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 returns V**T, not V. Again. Same disclaimer. It's giving consistent. πŸ’…

πŸ’… Parameters

JOBU

  • JOBU β€” CHARACTER*1, bestie, it decides your whole U situation:
    • 'V' β†’ the first min(m,n) columns of U (the left singular vectors), or whatever RANGE says, come back in the array U;
    • 'N' β†’ no columns of U, zero left singular vectors, we simply do not compute them.
  • JOBVT β€” CHARACTER*1, same energy but for V**T:
    • 'V' β†’ the first min(m,n) rows of V**T (the right singular vectors), or as specified by RANGE, get returned in the array VT;
    • 'N' β†’ no rows of V**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, so VL is out and VU is in β€” iykyk.)
    • 'I' β†’ the IL-th through IU-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 PRECISION array, dimension (LDA,N). On entry it holds the M-by-N matrix 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. If RANGE='V', this is the lower bound of the interval to be searched for singular values, and VU > VL. Not referenced at all if RANGE = 'A' or 'I'.
  • VU β€” DOUBLE PRECISION. If RANGE='V', this is the upper bound of the interval to be searched for singular values, and VU > VL. Not referenced at all if RANGE = 'A' or 'I'.
  • IL β€” INTEGER. If RANGE='I', the index of the smallest singular value to be returned. Constraint: 1 <= IL <= IU <= min(M,N), if min(M,N) > 0. Not referenced if RANGE = 'A' or 'V'.
  • IU β€” INTEGER. If RANGE='I', the index of the largest singular value to be returned. Constraint: 1 <= IL <= IU <= min(M,N), if min(M,N) > 0. Not referenced if RANGE = 'A' or 'V'.
  • NS β€” INTEGER, the total number of singular values found, with 0 <= NS <= min(M,N). If RANGE = 'A', then NS = min(M,N); if RANGE = 'I', then NS = IU-IL+1. Cute little tally of what you actually got πŸŽ€
  • S β€” DOUBLE PRECISION array, dimension (min(M,N)). The singular values of A, sorted so that S(i) >= S(i+1) β€” descending, the way nature intended. πŸ”₯
  • U β€” DOUBLE PRECISION 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. No cap, you gotta over-provision. 🫢
  • LDU β€” INTEGER, the leading dimension of the array U. LDU >= 1; and if JOBU = 'V', then LDU >= M.
  • VT β€” DOUBLE PRECISION 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. Same deal, bestie. πŸ™ˆ
  • LDVT β€” INTEGER, the leading dimension of the array VT. LDVT >= 1; and if JOBVT = 'V', then LDVT >= NS (see above, don't make me repeat myself πŸ’…).
  • WORK β€” DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, then WORK(1) returns the optimal LWORK. 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, LWORK should generally be larger. Bigger workspace = happier routine, ngl.
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. Iconic little shortcut, no notes. 😌
  • IWORK β€” 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 DBDSVDX/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: if INFO = -i, the i-th argument had an illegal value.
    • > 0: if INFO = i, then i eigenvectors failed to converge in DBDSVDX/DSTEVX. And if INFO = N*2 + 1, an internal error occurred in DBDSVDX. 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 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 β€” 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 β€” CHARACTER*1:
    • '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 β€” 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 β€” REAL array, dimension (LDA,N). On entry, the M-by-N matrix 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. If RANGE='V', the lower bound of the interval to be searched for singular values, with VU > VL. Not referenced if RANGE = 'A' or 'I'.
  • VU β€” REAL. If RANGE='V', the upper bound of the interval to be searched for singular values, with VU > VL. Not referenced if RANGE = 'A' or 'I'.
  • IL β€” 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 β€” 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 (INTEGER) β€” the total number of singular values found, and the range is 0 <= NS <= min(M,N). If RANGE = 'A' then NS = min(M,N); if RANGE = 'I' then NS = IU-IL+1. πŸ’…
  • S (REAL array, dimension (min(M,N))) β€” the singular values of A, sorted so that S(i) >= S(i+1). Descending order, bestie, biggest first ✨
  • U (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. Like, you literally cannot know it yet, so budget high πŸ™ˆ
  • LDU (INTEGER) β€” the leading dimension of the array U. LDU >= 1; if JOBU = 'V', LDU >= M. 🫢
  • VT (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. Same energy as above, no cap πŸ’€
  • LDVT (INTEGER) β€” the leading dimension of the array VT. LDVT >= 1; if JOBVT = 'V', LDVT >= NS (see above, bestie, it's all connected πŸ”—).
  • WORK (REAL array, dimension (MAX(1,LWORK))) β€” on exit, if INFO = 0, WORK(1) returns the optimal LWORK. 🌸
  • LWORK (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)

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))) β€” 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 (INTEGER)
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value 😬
    • > 0: if INFO = i, then i eigenvectors failed to converge in SBDSVDX/SSTEVX. If INFO = N*2 + 1, an internal error occurred in SBDSVDX. πŸ’€

πŸ‘‘ 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 returns V**T, not V. Read that twice, bestie β€” it's the number one gotcha here πŸŽ€

🌸 Parameters πŸŽ€

  • JOBU (CHARACTER1)* β€” 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 (CHARACTER1)* β€” 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 (CHARACTER1)*
    • = '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 (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 (COMPLEX16 array, dimension (LDA,N))* β€” on entry, the M-by-N matrix A. On exit, the contents of A are destroyed. RIP your input, it's gone πŸͺ¦πŸ˜­
  • LDA (INTEGER) β€” the leading dimension of the array A. LDA >= max(1,M).
  • VL (DOUBLE PRECISION) β€” 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 (DOUBLE PRECISION) β€” if RANGE='V', the upper bound of the interval to be searched for singular values. VU > VL. Not referenced if RANGE = 'A' or 'I'. So like, keep them in the right order or it's a vibe check fail πŸ˜…
  • IL (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 (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'. Yes, same bounds, they're a matching set πŸ’ž
  • NS (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 (DOUBLE PRECISION array, dimension (min(M,N))) β€” the singular values of A, sorted so that S(i) >= S(i+1). Descending, always descending πŸ“‰
  • U (COMPLEX16 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 (INTEGER) β€” the leading dimension of the array U. LDU >= 1; if JOBU = 'V', LDU >= M.
  • VT (COMPLEX16 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 (INTEGER) β€” the leading dimension of the array VT. LDVT >= 1; if JOBVT = 'V', LDVT >= NS (see above).
  • WORK (COMPLEX16 array, dimension (MAX(1,LWORK)))* β€” on exit, if INFO = 0, WORK(1) returns the optimal LWORK. 🌟
  • LWORK (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)

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 of MIN(M,N), it's giving maximalist πŸ’…
  • IWORK
  • IWORK β€” 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: if INFO = -i, the i-th argument had an illegal value πŸ™ˆ so like… check your inputs, girl
    • > 0: if INFO = i, then i eigenvectors failed to converge in DBDSVDX/DSTEVX 😭 not everything can be iconic
      • and if INFO = N*2 + 1, an internal error occurred in DBDSVDX β€” that one's not on you, that's a whole system situation πŸ’€

πŸ‘‘ 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