lasd1(3)
π NAME π
okay so bestie, this is lasd1(3) and the whole vibe is: lasd1 β lasd1: D&C step: merge subproblems. that's the main character energy here, no cap β¨
β¨ SYNOPSIS β¨
π§ Functions π§
dlasd1β DLASD1 computes the SVD of an upper bidiagonal matrix B of the specified size. Used by sbdsdc.</p>
subroutine dlasd1 (nl, nr, sqre, d, alpha, beta, u, ldu, vt, ldvt, idxq, iwork, work, info)
slasd1β SLASD1 computes the SVD of an upper bidiagonal matrix B of the specified size. Used by sbdsdc.</p>
subroutine slasd1 (nl, nr, sqre, d, alpha, beta, u, ldu, vt, ldvt, idxq, iwork, work, info)
π¦ Detailed Description π¦
the real tea is in the function docs right below, bestie. iykyk π
π Function Documentation π
π subroutine dlasd1 π
subroutine dlasd1 (integer nl, integer nr, integer sqre, double precision, dimension( * ) d, double precision alpha, double precision beta, double precision, dimension( ldu, * ) u, integer ldu, double precision, dimension( ldvt, * ) vt, integer ldvt, integer, dimension( * ) idxq, integer, dimension( * ) iwork, double precision, dimension( * ) work, integer info)
πΈ Purpose πΈ
okay so DLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B, where N = NL + NR + 1 and M = N + SQRE. DLASD1 is called from DLASD0.
a related subroutine DLASD7 handles the case in which the singular values (and the singular vectors in factored form) are desired.
DLASD1 computes the SVD as follows:
( D1(in) 0 0 0 )
B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
( 0 0 D2(in) 0 )
= U(out) * ( D(out) 0) * VT(out)
where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros elsewhere; and the entry b is empty if SQRE = 0.
the left singular vectors of the original matrix are stored in U, and the transpose of the right singular vectors are stored in VT, and the singular values are in D. the algorithm consists of three stages:
- the first stage consists of deflating the size of the problem when there are multiple singular values or when there are zeros in the
Zvector. for each such occurrence the dimension of the secular equation problem is reduced by one. this stage is performed by the routineDLASD2. - the second stage consists of calculating the updated singular values. this is done by finding the square roots of the roots of the secular equation via the routine
DLASD4(as called byDLASD3). this routine also calculates the singular vectors of the current problem. - the final stage consists of computing the updated singular vectors directly using the updated singular values. the singular vectors for the current problem are multiplied with the singular vectors from the overall problem.
πΈ Parameters πΈ
NLβINTEGER. the row dimension of the upper block.NL >= 1.NRβINTEGER. the row dimension of the lower block.NR >= 1.SQREβINTEGER.= 0: the lower block is anNR-by-NRsquare matrix.= 1: the lower block is anNR-by-(NR+1) rectangular matrix. the bidiagonal matrix has row dimensionN = NL + NR + 1, and column dimensionM = N + SQRE.DβDOUBLE PRECISIONarray, dimension (N = NL+NR+1). on entryD(1:NL,1:NL)contains the singular values of the upper block; andD(NL+2:N)contains the singular values of the lower block. on exitD(1:N)contains the singular values of the modified matrix.ALPHAβDOUBLE PRECISION. contains the diagonal element associated with the added row.BETAβDOUBLE PRECISION. contains the off-diagonal element associated with the added row.UβDOUBLE PRECISIONarray, dimension(LDU,N). on entryU(1:NL, 1:NL)contains the left singular vectors of the upper block;U(NL+2:N, NL+2:N)contains the left singular vectors of the lower block. on exitUcontains the left singular vectors of the bidiagonal matrix.LDUβINTEGER. the leading dimension of the arrayU.LDU >= max( 1, N ).VTβDOUBLE PRECISIONarray, dimension(LDVT,M) whereM = N + SQRE. on entryVT(1:NL+1, 1:NL+1)**Tcontains the right singular vectors of the upper block;VT(NL+2:M, NL+2:M)**Tcontains the right singular vectors of the lower block. on exitVT**Tcontains the right singular vectors of the bidiagonal matrix.LDVTβINTEGER. the leading dimension of the arrayVT.LDVT >= max( 1, M ).IDXQβINTEGERarray, dimension(N). this contains the permutation which will reintegrate the subproblem just solved back into sorted order, i.e.D( IDXQ( I = 1, N ) )will be in ascending order.IWORKβINTEGERarray, dimension(4 * N).WORKβDOUBLE PRECISIONarray, dimension(3*M**2 + 2*M).INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: ifINFO = 1, a singular value did not converge.
π 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 202 of file dlasd1.f.
π¦ subroutine slasd1 π¦
subroutine slasd1 (integer nl, integer nr, integer sqre, real, dimension( * ) d, real alpha, real beta, real, dimension( ldu, * ) u, integer ldu, real, dimension( ldvt, * ) vt, integer ldvt, integer, dimension( * ) idxq, integer, dimension( * ) iwork, real, dimension( * ) work, integer info)
πΈ Purpose πΈ
okay so SLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B, where N = NL + NR + 1 and M = N + SQRE. SLASD1 is called from SLASD0.
a related subroutine SLASD7 handles the case in which the singular values (and the singular vectors in factored form) are desired.
SLASD1 computes the SVD as follows:
( D1(in) 0 0 0 )
B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
( 0 0 D2(in) 0 )
= U(out) * ( D(out) 0) * VT(out)
where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros elsewhere; and the entry b is empty if SQRE = 0.
the left singular vectors of the original matrix are stored in U, and the transpose of the right singular vectors are stored in VT, and the singular values are in D. the algorithm consists of three stages:
- the first stage consists of deflating the size of the problem when there are multiple singular values or when there are zeros in the
Zvector. for each such occurrence the dimension of the secular equation problem is reduced by one. this stage is performed by the routineSLASD2. - the second stage consists of calculating the updated singular values. this is done by finding the square roots of the roots of the secular equation via the routine
SLASD4(as called bySLASD3). this routine also calculates the singular vectors of the current problem. - the final stage consists of computing the updated singular vectors directly using the updated singular values. the singular vectors for the current problem are multiplied with the singular vectors from the overall problem.
πΈ Parameters πΈ
NLβINTEGER. the row dimension of the upper block.NL >= 1.NRβINTEGER. the row dimension of the lower block.NR >= 1.SQREβINTEGER.= 0: the lower block is anNR-by-NRsquare matrix.= 1: the lower block is anNR-by-(NR+1) rectangular matrix. the bidiagonal matrix has row dimensionN = NL + NR + 1, and column dimensionM = N + SQRE.DβREALarray, dimension (NL+NR+1).N = NL+NR+1. on entryD(1:NL,1:NL)contains the singular values of the upper block; andD(NL+2:N)contains the singular values of the lower block. on exitD(1:N)contains the singular values of the modified matrix.ALPHAβREAL. contains the diagonal element associated with the added row.BETAβREAL. contains the off-diagonal element associated with the added row.UβREALarray, dimension (LDU,N). on entryU(1:NL, 1:NL)contains the left singular vectors of the upper block;U(NL+2:N, NL+2:N)contains the left singular vectors of the lower block. on exitUcontains the left singular vectors of the bidiagonal matrix.LDUβINTEGER. the leading dimension of the arrayU.LDU >= max( 1, N ).VT
okay so we're still in the argument tea, bestie β last little stack, every deet stays, no cap:
VTβVTisREALarray, dimension(LDVT,M), whereM = N + SQRE. On entry,VT(1:NL+1, 1:NL+1)**Tcontains the right singular vectors of the upper block;VT(NL+2:M, NL+2:M)**Tcontains the right singular vectors of the lower block. On exit,VT**Tcontains the right singular vectors of the bidiagonal matrix. literally the container for the singular-vector glow-up.LDVTβLDVTisINTEGER. It's the leading dimension of the arrayVT. Constraint:LDVT >= max( 1, M ). respect the leading dimension, bestie.IDXQβIDXQisINTEGERarray, dimension(N). It contains the permutation which will reintegrate the subproblem just solved back into sorted order, i.e.D( IDXQ( I = 1, N ) )will be in ascending order. sorting tea, served fresh.IWORKβIWORKisINTEGERarray, dimension(4*N). integer workspace, periodt.WORKβWORKisREALarray, dimension(3*M**2+2*M). real workspace, iconic.INFOβINFOisINTEGER:= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifINFO = 1, a singular value did not converge.
π 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 202 of file slasd1.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
byeee bestie β footer tea is LAPACK, Version 3.12.0, page lasd1(3) (no date line in this one). mwah πβ¨
π¦ 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