lasd2(3)
π
lasd2(3) β lasd2: D&C step: deflation β¨
(Library Functions Manual, but make it group chat.)
πΈ NAME πΈ
lasd2 β lasd2: D&C step: deflation
π«Ά SYNOPSIS π«Ά
Functions π
dlasd2 π¦
subroutine dlasd2 (nl, nr, sqre, k, d, z, alpha, beta, u, ldu, vt, ldvt,
dsigma, u2, ldu2, vt2, ldvt2, idxp, idx, idxc, idxq, coltyp, info)
DLASD2 merges the two sets of singular values together into a single sorted set. Used by sbdsdc.
slasd2 πΈ
subroutine slasd2 (nl, nr, sqre, k, d, z, alpha, beta, u, ldu, vt, ldvt,
dsigma, u2, ldu2, vt2, ldvt2, idxp, idx, idxc, idxq, coltyp, info)
SLASD2 merges the two sets of singular values together into a single sorted set. Used by sbdsdc.
π¦ Detailed Description π¦
Okay bestie, this page is the function-docs era of lasd2 β two subroutines, one very detailed vibe. Letβs get into it π
Function Documentation π
dlasd2 β the DOUBLE PRECISION one β¨
subroutine dlasd2 (integer nl, integer nr, integer sqre, integer k, double
precision, dimension( * ) d, double precision, dimension( * ) z, double
precision alpha, double precision beta, double precision, dimension(
ldu, * ) u, integer ldu, double precision, dimension( ldvt, * ) vt,
integer ldvt, double precision, dimension( * ) dsigma, double precision,
dimension( ldu2, * ) u2, integer ldu2, double precision, dimension(
ldvt2, * ) vt2, integer ldvt2, integer, dimension( * ) idxp, integer,
dimension( * ) idx, integer, dimension( * ) idxc, integer, dimension( *
) idxq, integer, dimension( * ) coltyp, integer info)
DLASD2 merges the two sets of singular values together into a single sorted set. Used by sbdsdc.
Purpose π
Bestie, hereβs the whole point: DLASD2 merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. There are two ways in which deflation can occur: when two or more singular values are close together or if there is a tiny entry in the Z vector. For each such occurrence the order of the related secular equation problem is reduced by one.
DLASD2 is called from DLASD1.
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 hasN = NL + NR + 1rows andM = N + SQRE >= Ncolumns.KβINTEGER. Contains the dimension of the non-deflated matrix, This is the order of the related secular equation.1 <= K <=N.DβDOUBLE PRECISIONarray, dimension(N). On entryDcontains the singular values of the two submatrices to be combined. On exitDcontains the trailing(N-K)updated singular values (those which were deflated) sorted into increasing order.ZβDOUBLE PRECISIONarray, dimension(N). On exitZcontains the updating row vector in the secular equation.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 entryUcontains the left singular vectors of two submatrices in the two square blocks with corners at(1,1),(NL, NL), and(NL+2, NL+2),(N,N). On exitUcontains the trailing(N-K)updated left singular vectors (those which were deflated) in its lastN-Kcolumns.LDUβINTEGER. The leading dimension of the arrayU.LDU >= N.VTβDOUBLE PRECISIONarray, dimension(LDVT,M). On entryVT**Tcontains the right singular vectors of two submatrices in the two square blocks with corners at(1,1),(NL+1, NL+1), and(NL+2, NL+2),(M,M). On exitVT**Tcontains the trailing(N-K)updated right singular vectors (those which were deflated) in its lastN-Kcolumns. In caseSQRE =1, the last row ofVTspans the right null space.LDVTβINTEGER. The leading dimension of the arrayVT.LDVT >= M.DSIGMAβDOUBLE PRECISIONarray, dimension(N). Contains a copy of the diagonal elements (K-1singular values and one zero) in the secular equation.U2βDOUBLE PRECISIONarray, dimension(LDU2,N). Contains a copy of the firstK-1left singular vectors which will be used byDLASD3in a matrix multiply (DGEMM) to solve for the new left singular vectors.U2is arranged into four blocks. The first block contains a column with1atNL+1and zero everywhere else; the second block contains non-zero entries only at and aboveNL; the third contains non-zero entries only belowNL+1; and the fourth is dense.LDU2βINTEGER. The leading dimension of the arrayU2.LDU2 >= N.VT2βDOUBLE PRECISIONarray, dimension(LDVT2,N).VT2**Tcontains a copy of the firstKright singular vectors which will be used byDLASD3in a matrix multiply (DGEMM) to solve for the new right singular vectors.VT2is arranged into three blocks. The first block contains a row that corresponds to the special0diagonal element inSIGMA; the second block contains non-zeros only at and beforeNL +1; the third block contains non-zeros only at and afterNL +2.LDVT2βINTEGER. The leading dimension of the arrayVT2.LDVT2 >= M.IDXPβINTEGERarray, dimension(N). This will contain the permutation used to place deflated values ofDat the end of the array. On outputIDXP(2:K)points to the nondeflatedD-values andIDXP(K+1:N)points to the deflated singular values.IDXβINTEGERarray, dimension(N). This will contain the permutation used to sort the contents ofDinto ascending order.IDXCβINTEGERarray, dimension(N). This will contain the permutation used to arrange the columns of the deflatedUmatrix into three groups: the first group contains non-zero entries only at and aboveNL, the second contains non-zero entries only belowNL+2, and the third is dense.IDXQβINTEGERarray, dimension(N). This contains the permutation which separately sorts the two sub-problems inDinto ascending order. Note that entries in the first hlaf of this permutation must first be moved one position backward; and entries in the second half must first haveNL+1added to their values.COLTYPβINTEGERarray, dimension(N). As workspace, this will contain a label which will indicate which of the following types a column in theU2matrix or a row in theVT2matrix is:1: non-zero in the upper half only2: non-zero in the lower half only3: dense4: deflated
On exit, it is an array of dimension 4, with COLTYP(I) being the dimension of the I-th type columns.
INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.
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 266 of file dlasd2.f.
slasd2 β the real one π
subroutine slasd2 (integer nl, integer nr, integer sqre, integer k, real,
dimension( * ) d, real, dimension( * ) z, real alpha, real beta, real,
dimension( ldu, * ) u, integer ldu, real, dimension( ldvt, * ) vt,
integer ldvt, real, dimension( * ) dsigma, real, dimension( ldu2, * )
u2, integer ldu2, real, dimension( ldvt2, * ) vt2, integer ldvt2,
integer, dimension( * ) idxp, integer, dimension( * ) idx, integer,
dimension( * ) idxc, integer, dimension( * ) idxq, integer, dimension( *
) coltyp, integer info)
SLASD2 merges the two sets of singular values together into a single sorted set. Used by sbdsdc.
Purpose π
SLASD2 merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. There are two ways in which deflation can occur: when two or more singular values are close together or if there is a tiny entry in the Z vector. For each such occurrence the order of the related secular equation problem is reduced by one.
SLASD2 is called from SLASD1.
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 hasN = NL + NR + 1rows andM = N + SQRE >= Ncolumns.KβINTEGER. Contains the dimension of the non-deflated matrix, This is the order of the related secular equation.1 <= K <=N.
parameter parade, part two β every detail stays, only the vibe changes π
DβDisREAL array, dimension (N). On entryDcontains the singular values of the two submatrices to be combined. On exitDcontains the trailing(N-K)updated singular values (those which were deflated) sorted into increasing order. β¨ZβZisREAL array, dimension (N). On exitZcontains the updating row vector in the secular equation. π«ΆALPHAβALPHAisREAL. Contains the diagonal element associated with the added row. πBETAβBETAisREAL. Contains the off-diagonal element associated with the added row. πUβUisREAL array, dimension (LDU,N). On entryUcontains the left singular vectors of two submatrices in the two square blocks with corners at(1,1),(NL, NL), and(NL+2, NL+2),(N,N). On exitUcontains the trailing(N-K)updated left singular vectors (those which were deflated) in its lastN-Kcolumns. π¦LDUβLDUisINTEGER. The leading dimension of the arrayU.LDU >= N. πVTβVTisREAL array, dimension (LDVT,M). On entryVT**Tcontains the right singular vectors of two submatrices in the two square blocks with corners at(1,1),(NL+1, NL+1), and(NL+2, NL+2),(M,M). On exitVT**Tcontains the trailing(N-K)updated right singular vectors (those which were deflated) in its lastN-Kcolumns. In caseSQRE =1, the last row ofVTspans the right null space. πΈLDVTβLDVTisINTEGER. The leading dimension of the arrayVT.LDVT >= M. πDSIGMAβDSIGMAisREAL array, dimension (N). Contains a copy of the diagonal elements (K-1singular values and one zero) in the secular equation. πU2βU2isREAL array, dimension (LDU2,N). Contains a copy of the firstK-1left singular vectors which will be used bySLASD3in a matrix multiply (SGEMM) to solve for the new left singular vectors.U2is arranged into four blocks. The first block contains a column with1atNL+1and zero everywhere else; the second block contains non-zero entries only at and aboveNL; the third contains non-zero entries only belowNL+1; and the fourth is dense. π₯LDU2βLDU2isINTEGER. The leading dimension of the arrayU2.LDU2 >= N. πVT2βVT2isREAL array, dimension (LDVT2,N).VT2**Tcontains a copy of the firstKright singular vectors which will be used bySLASD3in a matrix multiply (SGEMM) to solve for the new right singular vectors.VT2is arranged into three blocks. The first block contains a row that corresponds to the special0diagonal element inSIGMA; the second block contains non-zeros only at and beforeNL +1; the third block contains non-zeros only at and afterNL +2. βLDVT2βLDVT2isINTEGER. The leading dimension of the arrayVT2.LDVT2 >= M. π§IDXPβIDXPisINTEGER array, dimension (N). This will contain the permutation used to place deflated values ofDat the end of the array. On outputIDXP(2:K)points to the nondeflatedD-values andIDXP(K+1:N)points to the deflated singular values. πIDXβIDXisINTEGER array, dimension (N). This will contain the permutation used to sort the contents ofDinto ascending order. πIDXCβIDXCisINTEGER array, dimension (N). This will contain the permutation used to arrange the columns of the deflatedUmatrix into three groups: the first group contains non-zero entries only at and aboveNL, the second contains non-zero entries only belowNL+2, and the third is dense. πIDXQβIDXQisINTEGER array, dimension (N). This contains the permutation which separately sorts the two sub-problems inDinto ascending order. Note that entries in the firsthlafof this permutation must first be moved one position backward; and entries in the second half must first haveNL+1added to their values. (Yes,hlafis the source spelling β not me, bestie π)COLTYPβCOLTYPisINTEGER array, dimension (N). As workspace, this will contain a label which will indicate which of the following types a column in theU2matrix or a row in theVT2matrix is:1: non-zero in the upper half only,2: non-zero in the lower half only,3: dense,4: deflated. On exit, it is an array of dimension4, withCOLTYP(I)being the dimension of theI-th type columns. πINFOβINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value. π
π 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 266 of file slasd2.f. β¨
Author (Doxygen's encore)
Generated automatically by Doxygen for LAPACK from the source code. π§
π footer tea, bestie: source/version is LAPACK Version 3.12.0, page tag is lasd2(3) β the footer doesn't list a date, so that's the whole sign-off, periodt π
π¦ 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