SRC/sbdsdc.f(3)

πŸ’… SRC/sbdsdc.f

okay so bestie, gather round, because this one is a whole iconic LAPACK situation and it's literally in SRC/sbdsdc.f β€” the Library Functions Manual page, no less. sit down, hydrate, and let's get into it 🫢


✨ NAME ✨

SRC/sbdsdc.f β€” bestie, that's the whole name. the file. the moment. periodt.


🌸 SYNOPSIS 🌸

Functions/Subroutines

one bullet, one legend:

  • subroutine sbdsdc (uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info) β€” SBDSDC. yup. that's the one πŸ”₯

πŸŽ€ Function/Subroutine Documentation πŸŽ€

okay here's the actual queen herself, in all her declared glory β€” read it and weep (affectionately):

subroutine sbdsdc (character uplo, character compq, integer n, real,
    dimension( * ) d, real, dimension( * ) e, real, dimension( ldu, * ) u,
    integer ldu, real, dimension( ldvt, * ) vt, integer ldvt, real,
    dimension( * ) q, integer, dimension( * ) iq, real, dimension( * ) work,
    integer, dimension( * ) iwork, integer info)

SBDSDC


πŸ’– Purpose πŸ’–

so what does she do? SBDSDC computes the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, using a divide and conquer method. it's giving main character energy fr fr ✨

break it down with me:

  • S is a diagonal matrix with non-negative diagonal elements (those are the singular values of B πŸ’…)
  • U and VT are orthogonal matrices of left and right singular vectors, respectively

SBDSDC can be used to compute all singular values, and optionally, singular vectors or singular vectors in compact form. options, bestie. we love options.

⚠️ heads up, no cap: the code currently calls SLASDQ if singular values only are desired. however, it can be slightly modified to compute singular values using the divide and conquer method. iykyk πŸ™ˆ

πŸ¦‹ Parameters πŸ¦‹

every single one, in order, no skipping β€” we do not leave a parameter behind in this house:

  • UPLO β€” UPLO is CHARACTER*1.
    • = 'U': B is upper bidiagonal.
    • = 'L': B is lower bidiagonal.
  • COMPQ β€” COMPQ is CHARACTER*1. it specifies whether singular vectors are to be computed, as follows:
    • = 'N': compute singular values only;
    • = 'P': compute singular values and compute singular vectors in compact form;
    • = 'I': compute singular values and singular vectors.
  • N β€” N is INTEGER. the order of the matrix B. N >= 0. ✨
  • D β€” D is REAL array, dimension (N).
    • on entry, the n diagonal elements of the bidiagonal matrix B.
    • on exit, if INFO=0, the singular values of B.
  • E β€” E is REAL array, dimension (N-1).
    • on entry, the elements of E contain the offdiagonal elements of the bidiagonal matrix whose SVD is desired.
    • on exit, E has been destroyed. πŸ’€ yeah, she's gone. not sorry.
  • U β€” U is REAL array, dimension (LDU,N). if COMPQ = 'I', then: on exit, if INFO = 0, U contains the left singular vectors of the bidiagonal matrix. for other values of COMPQ, U is not referenced.
  • LDU β€” LDU is INTEGER. the leading dimension of the array U. LDU >= 1. if singular vectors are desired, then LDU >= max( 1, N ).
  • VT β€” VT is REAL array, dimension (LDVT,N). if COMPQ = 'I', then: on exit, if INFO = 0, VT**T contains the right singular vectors of the bidiagonal matrix. for other values of COMPQ, VT is not referenced.
  • LDVT β€” LDVT is INTEGER. the leading dimension of the array VT. LDVT >= 1. if singular vectors are desired, then LDVT >= max( 1, N ).
  • Q β€” Q is REAL array, dimension (LDQ). if COMPQ = 'P', then: on exit, if INFO = 0, Q and IQ contain the left and right singular vectors in a compact form, requiring O(N log N) space instead of 2*N**2. in particular, Q contains all the REAL data in LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25). for other values of COMPQ, Q is not referenced. πŸ“
  • IQ β€” IQ is INTEGER array, dimension (LDIQ). if COMPQ = 'P', then: on exit, if INFO = 0, Q and IQ contain the left and right singular vectors in a compact form, requiring O(N log N) space instead of 2*N**2. in particular, IQ contains all INTEGER data in LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25). for other values of COMPQ, IQ is not referenced.
  • WORK β€” WORK is REAL array, dimension (MAX(1,LWORK)).
    • if COMPQ = 'N' then LWORK >= (4 * N).
    • if COMPQ = 'P' then LWORK >= (6 * N).
    • if COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N).
  • IWORK β€” IWORK is INTEGER array, dimension (8*N). 🧚
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit. slay πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value.
    • > 0: the algorithm failed to compute a singular value. the update process of divide and conquer failed. 😭

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

🌈 Contributors: 🌈

Ming Gu and Huan Ren, Computer Science Division, University of California at Berkeley, USA 🫢


⭐ Definition at line 196 of file sbdsdc.f.

literally line 196. not me counting. okay maybe me counting.


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code. (the robots did this one, bestie β€” we just made it cute πŸ€–βœ¨)


and that's the whole vibe check, bestie: <rainbow>LAPACK Version 3.12.0, page SRC/sbdsdc.f(3), dated accordingly. go forth, compute your singular values, and remember β€” Egets destroyed,INFO > 0` means the divide and conquer update process failed, and you are still that girl πŸ’…πŸ’–

πŸ“¦ where this page comes from