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 β€” ICOMPQ is INTEGER. 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 β€” NL is INTEGER. The row dimension of the upper block. NL >= 1.
  • NR β€” NR is INTEGER. The row dimension of the lower block. NR >= 1.
  • SQRE β€” SQRE is INTEGER. = 0: the lower block is an NR-by-NR square matrix. = 1: the lower block is an NR-by-(NR+1) rectangular matrix. The bidiagonal matrix has N = NL + NR + 1 rows and M = N + SQRE >= N columns. πŸŽ€
  • K β€” K is INTEGER. Contains the dimension of the non-deflated matrix; this is the order of the related secular equation. 1 <= K <=N.
  • D β€” D is DOUBLE PRECISION array, dimension ( N ). On entry, D contains the singular values of the two submatrices to be combined. On exit, D contains the trailing (N-K) updated singular values (those which were deflated) sorted into increasing order.
  • Z β€” Z is DOUBLE PRECISION array, dimension ( M ). On exit, Z contains the updating row vector in the secular equation.
  • ZW β€” ZW is DOUBLE PRECISION array, dimension ( M ). Workspace for Z.
  • VF β€” VF is DOUBLE PRECISION array, dimension ( M ). On entry, VF(1:NL+1) contains the first components of all right singular vectors of the upper block; and VF(NL+2:M) contains the first components of all right singular vectors of the lower block. On exit, VF contains the first components of all right singular vectors of the bidiagonal matrix. πŸ’–
  • VFW β€” VFW is DOUBLE PRECISION array, dimension ( M ). Workspace for VF.
  • VL β€” VL is DOUBLE PRECISION array, dimension ( M ). On entry, VL(1:NL+1) contains the last components of all right singular vectors of the upper block; and VL(NL+2:M) contains the last components of all right singular vectors of the lower block. On exit, VL contains the last components of all right singular vectors of the bidiagonal matrix.
  • VLW β€” VLW is DOUBLE PRECISION array, dimension ( M ). Workspace for VL.
  • ALPHA β€” ALPHA is DOUBLE PRECISION. Contains the diagonal element associated with the added row.
  • BETA β€” BETA is DOUBLE PRECISION. Contains the off-diagonal element associated with the added row.
  • DSIGMA β€” DSIGMA is DOUBLE PRECISION array, dimension ( N ). Contains a copy of the diagonal elements (K-1 singular values and one zero) in the secular equation.
  • IDX β€” IDX is INTEGER array, dimension ( N ). This will contain the permutation used to sort the contents of D into ascending order.
  • IDXP β€” IDXP is INTEGER array, dimension ( N ). This will contain the permutation used to place deflated values of D at the end of the array. On output, IDXP(2:K) points to the nondeflated D-values and IDXP(K+1:N) points to the deflated singular values.
  • IDXQ β€” IDXQ is INTEGER array, dimension ( N ). This contains the permutation which separately sorts the two sub-problems in D into 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 have NL+1 added to their values. 🧚
  • PERM β€” PERM is INTEGER array, dimension ( N ). The permutations (from deflation and sorting) to be applied to each singular block. Not referenced if ICOMPQ = 0.
  • GIVPTR β€” GIVPTR is INTEGER. The number of Givens rotations which took place in this subproblem. Not referenced if ICOMPQ = 0.
  • GIVCOL β€” GIVCOL is INTEGER array, dimension ( LDGCOL, 2 ). Each pair of numbers indicates a pair of columns to take place in a Givens rotation. Not referenced if ICOMPQ = 0.
  • LDGCOL β€” LDGCOL is INTEGER. The leading dimension of GIVCOL; must be at least N.
  • GIVNUM β€” GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 ). Each number indicates the C or S value to be used in the corresponding Givens rotation. Not referenced if ICOMPQ = 0.
  • LDGNUM β€” LDGNUM is INTEGER. The leading dimension of GIVNUM; must be at least N.
  • C β€” C is DOUBLE PRECISION. C contains garbage if SQRE =0 and the C-value of a Givens rotation related to the right null space if SQRE = 1. πŸ’€
  • S β€” S is DOUBLE PRECISION. S contains garbage if SQRE =0 and the S-value of a Givens rotation related to the right null space if SQRE = 1. πŸ’€
  • INFO β€” INFO is INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-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 β€” ICOMPQ is INTEGER. 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 β€” NL is INTEGER. The row dimension of the upper block. NL >= 1.
  • NR β€” NR is INTEGER. The row dimension of the lower block. NR >= 1.
  • SQRE β€” SQRE is in the signature as INTEGER, 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 an NR-by-NR square matrix.
    • = 1: the lower block is an NR-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 are 1 <= K <= N, no cap 🫢
  • D β€” REAL array, dimension ( N ). On entry, D is 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, Z holds the updating row vector in the secular equation. Main character energy fr.
  • ZW β€” REAL array, dimension ( M ). It's just workspace for Z. 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, and VF(NL+2:M) contains the first components of all right singular vectors of the lower block. On exit, VF contains the first components of all right singular vectors of the bidiagonal matrix. Glow-up complete ✨
  • VFW β€” REAL array, dimension ( M ). Workspace for VF. 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, and VL(NL+2:M) contains the last components of all right singular vectors of the lower block. On exit, VL contains the last components of all right singular vectors of the bidiagonal matrix. Same energy as VF but make it last-component πŸ¦‹
  • VLW β€” REAL array, dimension ( M ). Workspace for VL. 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 to ALPHA, they're a package deal.
  • DSIGMA β€” REAL array, dimension ( N ). Contains a copy of the diagonal elements (K-1 singular 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 of D into ascending order.
  • IDXP β€” INTEGER array, dimension ( N ). This will contain the permutation used to place deflated values of D at the end of the array. On output, IDXP(2:K) points to the nondeflated D-values and IDXP(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 in D into 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+1 added 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 if ICOMPQ = 0.
  • GIVPTR β€” INTEGER. The number of Givens rotations which took place in this subproblem. Not referenced if ICOMPQ = 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 if ICOMPQ = 0. Pairs! It's giving matched set 🫢
  • LDGCOL β€” INTEGER. The leading dimension of GIVCOL, and it must be at least N. Do not test her.
  • GIVNUM β€” REAL array, dimension ( LDGNUM, 2 ). Each number indicates the C or S value to be used in the corresponding Givens rotation. Not referenced if ICOMPQ = 0.
  • LDGNUM β€” INTEGER. The leading dimension of GIVNUM, and again it must be at least N. Same rule, no exceptions ✨
  • C β€” REAL. Contains garbage if SQRE = 0 πŸ’€ and the C-value of a Givens rotation related to the right null space if SQRE = 1. So like, check SQRE before you trust her.
  • S β€” REAL. Contains garbage if SQRE = 0 πŸ’€ and the S-value of a Givens rotation related to the right null space if SQRE = 1. Same deal, C's partner in crime.
  • INFO β€” INTEGER. The receipts:
    • = 0: successful exit. We love a clean win 🌈
    • < 0: if INFO = -i, the i-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 call slasd7 responsibly β€” and remember, SQRE = 0 means C and S are 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