lasd7(3)
okay so this is lasd7(3) from the Library Functions Manual β literally the lasd7 page, and it's all about lasd7: D&C step: deflation. Buckle up, bestie, we're doing linear algebra with main character energy. π
β¨
β¨ NAME β¨
lasd7 β lasd7: D&C step: deflation. That's the whole vibe, no cap. π
πΈ SYNOPSIS πΈ
π«Ά Functions π«Ά
subroutine dlasd7 (icompq, nl, nr, sqre, k, d, z, zw, vf, vfw, vl, vlw,
alpha, beta, dsigma, idx, idxp, idxq, perm, givptr, givcol, ldgcol,
givnum, ldgnum, c, s, info)
DLASD7 merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. Used by sbdsdc. π
subroutine slasd7 (icompq, nl, nr, sqre, k, d, z, zw, vf, vfw, vl, vlw,
alpha, beta, dsigma, idx, idxp, idxq, perm, givptr, givcol, ldgcol,
givnum, ldgnum, c, s, info)
SLASD7 merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. Used by sbdsdc. π
π« Detailed Description π«
This section is basically the hallway to the function documentation below, bestie. The real deets are in the function docs, so let's slide into those. β¨
π Function Documentation π
π subroutine dlasd7 π
subroutine dlasd7 (integer icompq, integer nl, integer nr, integer sqre,
integer k, double precision, dimension( * ) d, double precision,
dimension( * ) z, double precision, dimension( * ) zw, double precision,
dimension( * ) vf, double precision, dimension( * ) vfw, double
precision, dimension( * ) vl, double precision, dimension( * ) vlw,
double precision alpha, double precision beta, double precision,
dimension( * ) dsigma, integer, dimension( * ) idx, integer, dimension(
* ) idxp, integer, dimension( * ) idxq, integer, dimension( * ) perm,
integer givptr, integer, dimension( ldgcol, * ) givcol, integer ldgcol,
double precision, dimension( ldgnum, * ) givnum, integer ldgnum, double
precision c, double precision s, integer info)
DLASD7 merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. Used by sbdsdc. π¦
π₯ Purpose π₯
okay so here's the tea: DLASD7 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 deflation can happen: when two or more singular values are close together, or if there's a tiny entry in the Z vector. For each such occurrence, the order of the related secular equation problem is reduced by one. π
Also important: DLASD7 is called from DLASD6. iykyk. π
π Parameters π
ICOMPQβICOMPQisINTEGER. It says whether singular vectors are to be computed in compact form, like this:= 0: compute singular values only.= 1: compute singular vectors of upper bidiagonal matrix in compact form.NLβNLisINTEGER. The row dimension of the upper block.NL >= 1.NRβNRisINTEGER. The row dimension of the lower block.NR >= 1.SQREβSQREisINTEGER.= 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βKisINTEGER. Contains the dimension of the non-deflated matrix; this is the order of the related secular equation.1 <= K <=N.DβDisDOUBLE PRECISIONarray,dimension ( N ). On entry,Dcontains the singular values of the two submatrices to be combined. On exit,Dcontains the trailing(N-K)updated singular values (those which were deflated) sorted into increasing order.ZβZisDOUBLE PRECISIONarray,dimension ( M ). On exit,Zcontains the updating row vector in the secular equation.ZWβZWisDOUBLE PRECISIONarray,dimension ( M ). Workspace forZ.VFβVFisDOUBLE PRECISIONarray,dimension ( M ). On entry,VF(1:NL+1)contains the first components of all right singular vectors of the upper block; andVF(NL+2:M)contains the first components of all right singular vectors of the lower block. On exit,VFcontains the first components of all right singular vectors of the bidiagonal matrix. πVFWβVFWisDOUBLE PRECISIONarray,dimension ( M ). Workspace forVF.VLβVLisDOUBLE PRECISIONarray,dimension ( M ). On entry,VL(1:NL+1)contains the last components of all right singular vectors of the upper block; andVL(NL+2:M)contains the last components of all right singular vectors of the lower block. On exit,VLcontains the last components of all right singular vectors of the bidiagonal matrix.VLWβVLWisDOUBLE PRECISIONarray,dimension ( M ). Workspace forVL.ALPHAβALPHAisDOUBLE PRECISION. Contains the diagonal element associated with the added row.BETAβBETAisDOUBLE PRECISION. Contains the off-diagonal element associated with the added row.DSIGMAβDSIGMAisDOUBLE PRECISIONarray,dimension ( N ). Contains a copy of the diagonal elements (K-1singular values and one zero) in the secular equation.IDXβIDXisINTEGERarray,dimension ( N ). This will contain the permutation used to sort the contents ofDinto ascending order.IDXPβIDXPisINTEGERarray,dimension ( N ). This will contain the permutation used to place deflated values ofDat the end of the array. On output,IDXP(2:K)points to the nondeflatedD-values andIDXP(K+1:N)points to the deflated singular values.IDXQβIDXQisINTEGERarray,dimension ( N ). This contains the permutation which separately sorts the two sub-problems inDinto ascending order. Note that entries in the first half of this permutation must first be moved one position backward; and entries in the second half must first haveNL+1added to their values. π§PERMβPERMisINTEGERarray,dimension ( N ). The permutations (from deflation and sorting) to be applied to each singular block. Not referenced ifICOMPQ = 0.GIVPTRβGIVPTRisINTEGER. The number of Givens rotations which took place in this subproblem. Not referenced ifICOMPQ = 0.GIVCOLβGIVCOLisINTEGERarray,dimension ( LDGCOL, 2 ). Each pair of numbers indicates a pair of columns to take place in a Givens rotation. Not referenced ifICOMPQ = 0.LDGCOLβLDGCOLisINTEGER. The leading dimension ofGIVCOL; must be at leastN.GIVNUMβGIVNUMisDOUBLE PRECISIONarray,dimension ( LDGNUM, 2 ). Each number indicates theCorSvalue to be used in the corresponding Givens rotation. Not referenced ifICOMPQ = 0.LDGNUMβLDGNUMisINTEGER. The leading dimension ofGIVNUM; must be at leastN.CβCisDOUBLE PRECISION.Ccontains garbage ifSQRE =0and theC-value of a Givens rotation related to the right null space ifSQRE = 1. πSβSisDOUBLE PRECISION.Scontains garbage ifSQRE =0and theS-value of a Givens rotation related to the right null space ifSQRE = 1. π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. iconic. π
Definition at line 276 of file dlasd7.f.
π¦ subroutine slasd7 π¦
subroutine slasd7 (integer icompq, integer nl, integer nr, integer sqre,
integer k, real, dimension( * ) d, real, dimension( * ) z, real,
dimension( * ) zw, real, dimension( * ) vf, real, dimension( * ) vfw,
real, dimension( * ) vl, real, dimension( * ) vlw, real alpha, real
beta, real, dimension( * ) dsigma, integer, dimension( * ) idx, integer,
dimension( * ) idxp, integer, dimension( * ) idxq, integer, dimension( *
) perm, integer givptr, integer, dimension( ldgcol, * ) givcol, integer
ldgcol, real, dimension( ldgnum, * ) givnum, integer ldgnum, real c,
real s, integer info)
SLASD7 merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. Used by sbdsdc. πΈ
π₯ Purpose π₯
so SLASD7 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 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. periodt. β¨
And yes: SLASD7 is called from SLASD6. π«Ά
π Parameters π
ICOMPQβICOMPQisINTEGER. Specifies whether singular vectors are to be computed in compact form, as follows:= 0: compute singular values only.= 1: compute singular vectors of upper bidiagonal matrix in compact form.NLβNLisINTEGER. The row dimension of the upper block.NL >= 1.NRβNRisINTEGER. The row dimension of the lower block.NR >= 1.SQREβSQREis in the signature asINTEGER, and this is exactly where part 1 hands off to part 2, bestie. π«ΆSQREβ INTEGER, and it's the vibe check on the lower block β¨= 0: the lower block is anNR-by-NRsquare matrix.= 1: the lower block is anNR-by-(NR+1)rectangular matrix.
So the whole bidiagonal matrix has
N = NL + NR + 1 rows and
M = N + SQRE >= N columns.
Kβ INTEGER. It holds the dimension of the non-deflated matrix, which is literally just the order of the related secular equation. Bounds are1 <= K <= N, no cap π«ΆDβ REAL array, dimension ( N ). On entry,Dis carrying the singular values of the two submatrices that are getting combined. On exit it's giving the trailing(N-K)updated singular values β those are the deflated ones, bestie β sorted into increasing order πZβ REAL array, dimension ( M ). On exit,Zholds the updating row vector in the secular equation. Main character energy fr.ZWβ REAL array, dimension ( M ). It's just workspace forZ. Supportive bestie behavior.VFβ REAL array, dimension ( M ). On entry,VF(1:NL+1)contains the first components of all right singular vectors of the upper block, andVF(NL+2:M)contains the first components of all right singular vectors of the lower block. On exit,VFcontains the first components of all right singular vectors of the bidiagonal matrix. Glow-up complete β¨VFWβ REAL array, dimension ( M ). Workspace forVF. That's it, that's the whole job.VLβ REAL array, dimension ( M ). On entry,VL(1:NL+1)contains the last components of all right singular vectors of the upper block, andVL(NL+2:M)contains the last components of all right singular vectors of the lower block. On exit,VLcontains the last components of all right singular vectors of the bidiagonal matrix. Same energy asVFbut make it last-component π¦VLWβ REAL array, dimension ( M ). Workspace forVL. Iconic, consistent, reliable.ALPHAβ REAL. Contains the diagonal element associated with the added row π₯BETAβ REAL. Contains the off-diagonal element associated with the added row. Yes she's related toALPHA, they're a package deal.DSIGMAβ REAL array, dimension ( N ). Contains a copy of the diagonal elements (K-1singular values and one zero) in the secular equation. Not me obsessing over that one lone zero πIDXβ INTEGER array, dimension ( N ). This will contain the permutation used to sort the contents ofDinto ascending order.IDXPβ INTEGER array, dimension ( N ). This will contain the permutation used to place deflated values ofDat the end of the array. On output,IDXP(2:K)points to the nondeflatedD-values andIDXP(K+1:N)points to the deflated singular values. She's organizing, she's categorizing, she's that girl πIDXQβ INTEGER array, dimension ( N ). This contains the permutation which separately sorts the two sub-problems inDinto ascending order. Careful though, bestie, this one has lore:- entries in the first half of this permutation must first be moved one position backward;
- and entries in the second half must first have
NL+1added to their values.
Like, it's not plug-and-play, you have to do the little shuffle first π
PERMβ INTEGER array, dimension ( N ). The permutations (from deflation and sorting) to be applied to each singular block. Not referenced ifICOMPQ = 0.GIVPTRβ INTEGER. The number of Givens rotations which took place in this subproblem. Not referenced ifICOMPQ = 0. She's counting the rotations, keeping receipts πGIVCOLβ INTEGER array, dimension ( LDGCOL, 2 ). Each pair of numbers indicates a pair of columns to take place in a Givens rotation. Not referenced ifICOMPQ = 0. Pairs! It's giving matched set π«ΆLDGCOLβ INTEGER. The leading dimension ofGIVCOL, and it must be at leastN. Do not test her.GIVNUMβ REAL array, dimension ( LDGNUM, 2 ). Each number indicates theCorSvalue to be used in the corresponding Givens rotation. Not referenced ifICOMPQ = 0.LDGNUMβ INTEGER. The leading dimension ofGIVNUM, and again it must be at leastN. Same rule, no exceptions β¨Cβ REAL. Contains garbage ifSQRE = 0π and theC-value of a Givens rotation related to the right null space ifSQRE = 1. So like, checkSQREbefore you trust her.Sβ REAL. Contains garbage ifSQRE = 0π and theS-value of a Givens rotation related to the right null space ifSQRE = 1. Same deal,C's partner in crime.INFOβ INTEGER. The receipts:= 0: successful exit. We love a clean win π< 0: ifINFO = -i, thei-th argument had an illegal value. Someone fumbled an input, bestie π
πΈ 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 β absolute icons, we stan π
β Definition β
Definition at line 276 of file slasd7.f.
π Author (yes, again) π
Generated automatically by Doxygen for LAPACK from the source code. Not a human, just a very diligent robot π§
Okay that's the whole page, bestie! Go forth and callslasd7responsibly β and remember,SQRE = 0meansCandSare straight-up garbage, so don't come for me when you read them anyway π
This lil masterpiece is LAPACK Version 3.12.0, page lasd7(3) β mwah, go slay your linear algebra πβ¨
π¦ 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