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:
Sis a diagonal matrix with non-negative diagonal elements (those are the singular values ofBπ )UandVTare 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βUPLOisCHARACTER*1.= 'U':Bis upper bidiagonal.= 'L':Bis lower bidiagonal.
COMPQβCOMPQisCHARACTER*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βNisINTEGER. the order of the matrixB.N >= 0. β¨DβDisREALarray, dimension(N).- on entry, the
ndiagonal elements of the bidiagonal matrixB. - on exit, if
INFO=0, the singular values ofB.
- on entry, the
EβEisREALarray, dimension(N-1).- on entry, the elements of
Econtain the offdiagonal elements of the bidiagonal matrix whose SVD is desired. - on exit,
Ehas been destroyed. π yeah, she's gone. not sorry.
- on entry, the elements of
UβUisREALarray, dimension(LDU,N). ifCOMPQ = 'I', then: on exit, ifINFO = 0,Ucontains the left singular vectors of the bidiagonal matrix. for other values ofCOMPQ,Uis not referenced.LDUβLDUisINTEGER. the leading dimension of the arrayU.LDU >= 1. if singular vectors are desired, thenLDU >= max( 1, N ).VTβVTisREALarray, dimension(LDVT,N). ifCOMPQ = 'I', then: on exit, ifINFO = 0,VT**Tcontains the right singular vectors of the bidiagonal matrix. for other values ofCOMPQ,VTis not referenced.LDVTβLDVTisINTEGER. the leading dimension of the arrayVT.LDVT >= 1. if singular vectors are desired, thenLDVT >= max( 1, N ).QβQisREALarray, dimension(LDQ). ifCOMPQ = 'P', then: on exit, ifINFO = 0,QandIQcontain the left and right singular vectors in a compact form, requiringO(N log N)space instead of2*N**2. in particular,Qcontains all theREALdata inLDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1))))words of memory, whereSMLSIZis returned byILAENVand is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about25). for other values ofCOMPQ,Qis not referenced. πIQβIQisINTEGERarray, dimension(LDIQ). ifCOMPQ = 'P', then: on exit, ifINFO = 0,QandIQcontain the left and right singular vectors in a compact form, requiringO(N log N)space instead of2*N**2. in particular,IQcontains allINTEGERdata inLDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1))))words of memory, whereSMLSIZis returned byILAENVand is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about25). for other values ofCOMPQ,IQis not referenced.WORKβWORKisREALarray, dimension(MAX(1,LWORK)).- if
COMPQ = 'N'thenLWORK >= (4 * N). - if
COMPQ = 'P'thenLWORK >= (6 * N). - if
COMPQ = 'I'thenLWORK >= (3 * N**2 + 4 * N).
- if
IWORKβIWORKisINTEGERarray, dimension(8*N). π§INFOβINFOisINTEGER.= 0: successful exit. slay π< 0: ifINFO = -i, thei-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
- 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