bdsdc(3)
πΈ NAME πΈ
bdsdc β bidiagonal SVD, divide and conquer. Yes bestie, that's the whole name, and it's giving iconic π
β¨ SYNOPSIS β¨
Functions π«Ά
subroutine dbdsdc (uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work,
iwork, info)
DBDSDC
subroutine sbdsdc (uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work,
iwork, info)
SBDSDC
π Detailed Description π
okay so like, this is the part where the actual docs live. keep scrolling, beautiful, the good stuff is right below β¬οΈ
π₯ Function Documentation π₯
subroutine dbdsdc β the double precision one π
subroutine dbdsdc (character uplo, character compq, integer n, double
precision, dimension( * ) d, double precision, dimension( * ) e, double
precision, dimension( ldu, * ) u, integer ldu, double precision,
dimension( ldvt, * ) vt, integer ldvt, double precision, dimension( * )
q, integer, dimension( * ) iq, double precision, dimension( * ) work,
integer, dimension( * ) iwork, integer info)
DBDSDC
π¦ Purpose:
no cap, here's the whole vibe:
DBDSDC 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, where S is a diagonal matrix with non-negative diagonal elements (the singular values of B), and U and VT are orthogonal matrices of left and right singular vectors, respectively. DBDSDC can be used to compute all singular values, and optionally, singular vectors or singular vectors in compact form. π
ngl there's one little detail: the code currently calls DLASDQ if singular values only are desired. However, it can be slightly modified to compute singular values using the divide and conquer method. iykyk π₯
π Parameters
UPLOβCHARACTER*1. which way is the bidiagonal leaning, bestie?= 'U':B is upper bidiagonal.= 'L':B is lower bidiagonal.
COMPQβCHARACTER*1. says 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βINTEGER. The order of the matrix B.N >= 0. (yes, zero is allowed, she's inclusive β¨)DβDOUBLE PRECISIONarray, dimension (N). On entry, the n diagonal elements of the bidiagonal matrix B. On exit, ifINFO=0, the singular values of B. glow-up fr fr π«EβDOUBLE PRECISIONarray, 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. π like, gone gone. don't come looking for it.UβDOUBLE PRECISIONarray, dimension (LDU,N). IfCOMPQ = 'I', then: on exit, ifINFO = 0, U contains the left singular vectors of the bidiagonal matrix. For other values of COMPQ, U is not referenced. (she's on standby, not invited to every party π)LDUβINTEGER. The leading dimension of the array U.LDU >= 1. If singular vectors are desired, thenLDU >= max( 1, N ).VTβDOUBLE PRECISIONarray, dimension (LDVT,N). IfCOMPQ = 'I', then: on exit, ifINFO = 0,VT**Tcontains the right singular vectors of the bidiagonal matrix. For other values of COMPQ, VT is not referenced. (transpose queen π note the**T!)LDVTβINTEGER. The leading dimension of the array VT.LDVT >= 1. If singular vectors are desired, thenLDVT >= max( 1, N ).QβDOUBLE PRECISIONarray, dimension (LDQ). IfCOMPQ = 'P', then: on exit, ifINFO = 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 DOUBLE PRECISION 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. π§ saving so much space, she's thrifty.
IQβINTEGERarray, dimension (LDIQ). IfCOMPQ = 'P', then: on exit, ifINFO = 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. (same deal as Q, but make it integers π)
WORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). the workspace, sized like this:- If
COMPQ = 'N'thenLWORK >= (4 * N). - If
COMPQ = 'P'thenLWORK >= (6 * N). - If
COMPQ = 'I'thenLWORK >= (3 * N**2 + 4 * N).
- If
IWORKβINTEGERarray, dimension(8*N). that's it, that's the whole description, she's low maintenance πINFOβINTEGER. the vibe check at the end:= 0:successful exit. slay π< 0:ifINFO = -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. π not the divide and conquer falling apart mid-update.
π 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 dbdsdc.f.
subroutine sbdsdc β the single precision sibling πΈ
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:
literally the same energy as above, just REAL:
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, where S is a diagonal matrix with non-negative diagonal elements (the singular values of B), and 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. β¨
and the same caveat, bestie: 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. (note SLASDQ here, not DLASDQ β precision matters π
)
π Parameters
UPLOβCHARACTER*1. which way is she leaning?= 'U':B is upper bidiagonal.= 'L':B is lower bidiagonal.
COMPQβCHARACTER*1. 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βINTEGER. The order of the matrix B.N >= 0.DβREALarray, dimension (N). On entry, the n diagonal elements of the bidiagonal matrix B. On exit, ifINFO=0, the singular values of B. πEβREALarray, 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. π rip.UβREALarray, dimension (LDU,N). IfCOMPQ = 'I', then: on exit, ifINFO = 0, U contains the left singular vectors of the bidiagonal matrix. For other values of COMPQ, U is not referenced.LDUβINTEGER. The leading dimension of the array U.LDU >= 1. If singular vectors are desired, thenLDU >= max( 1, N ).VTβREALarray, dimension (LDVT,N). IfCOMPQ = 'I', then: on exit, ifINFO = 0,VT**Tcontains the right singular vectors of the bidiagonal matrix. For other values of COMPQ, VT is not referenced. (again β the**Tis doing the work, don't sleep on it π)LDVTβINTEGER. The leading dimension of the array VT.LDVT >= 1. If singular vectors are desired, thenLDVT >= max( 1, N ).QβREALarray, dimension (LDQ). IfCOMPQ = 'P', then: on exit, ifINFO = 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βINTEGERarray, dimension (LDIQ). IfCOMPQ = 'P', then: on exit, ifINFO = 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 inIQβ INTEGER array, dimension(LDIQ)π- If
COMPQ = '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 all INTEGER data 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 about 25). π§ - For other values of
COMPQ,IQis not referenced. literally doesn't even get a vibe check bestie, it's just sitting there π
- If
WORKβ WORK is REAL array, 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). π that third one is giving "my RAM is crying" energy ngl
- If
IWORKβ IWORK is INTEGER array, dimension(8*N)πINFOβ INFO is INTEGER, and this icon is the whole mood report π= 0: successful exit. slay, we ate π< 0: ifINFO = -i, the i-th argument had an illegal value. not me calling out your arg by number π> 0: The algorithm failed to compute a singular value. The update process of divide and conquer failed. π«Ά lowkey devastating, sending hugs
π 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.
π Author
Generated automatically by Doxygen for LAPACK from the source code. yes bestie the robots wrote the bio, that's just how it is π
and that's the whole page, bestie! πβ¨ quick cute sign-off for the footer: this is bdsdc(3) from LAPACK Version 3.12.0 β that's the source and the version the footer's repping, so don't come for me about the date, it's not on the page ππ
π¦ 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