DLASD2(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… DLASD2(3) β€” the merge‑and‑deflate queen πŸ‘‘

okay bestie, welcome to the Library Functions Manual moment for DLASD2(3). she lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlasd2.f and honestly? she's iconic. πŸ’–


🌸 NAME 🌸

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlasd2.f β€” like, literally the whole path. that's the name. no cap. πŸŽ€


✨ SYNOPSIS ✨

Functions/Subroutines

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.


🫢 Function/Subroutine Documentation 🫢

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

okay so here's the tea, bestie. DLASD2 merges the two sets of singular values together into a single sorted set. then it tries to deflate the size of the problem. and there are exactly 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. slay. πŸ’…

DLASD2 is called from DLASD1. periodt.

πŸ’– Parameters

NL

NL is INTEGER. the row dimension of the upper block. NL >= 1. no exceptions, bestie. ✨

NR

NR is INTEGER. the row dimension of the lower block. NR >= 1. again, that's the floor.

SQRE

SQRE is INTEGER. here's the vibe check:

  • = 0: the lower block is an NR-by-NR square matrix. lowkey simple.
  • = 1: the lower block is an NR-by-(NR+1) rectangular matrix. a little extra, we love.

the bidiagonal matrix has N = NL + NR + 1 rows and M = N + SQRE >= N columns. write that down. πŸ¦‹

K

K is INTEGER. contains the dimension of the non-deflated matrix. this is the order of the related secular equation. 1 <= K <=N. yes, capital N at the end, that's how she wrote it. πŸ’€

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. glow-up behavior, honestly. πŸ”₯

Z

Z is DOUBLE PRECISION array, dimension(N). on exit, Z contains the updating row vector in the secular equation. that's the whole thing.

ALPHA

ALPHA is DOUBLE PRECISION. contains the diagonal element associated with the added row. main character energy. πŸ‘‘

BETA

BETA is DOUBLE PRECISION. contains the off-diagonal element associated with the added row. the sidekick, but make it math.

U

U is DOUBLE PRECISION array, dimension(LDU,N). on entry, U contains 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 exit, U contains the trailing (N-K) updated left singular vectors (those which were deflated) in its last N-K columns.

LDU

LDU is INTEGER. the leading dimension of the array U. LDU >= N. respect the floor, bestie.

VT

VT is DOUBLE PRECISION array, dimension(LDVT,M). on entry, VT**T contains 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 exit, VT**T contains the trailing (N-K) updated right singular vectors (those which were deflated) in its last N-K columns. in case SQRE =1, the last row of VT spans the right null space. that's her little superpower. 🧚

LDVT

LDVT is INTEGER. the leading dimension of the array VT. LDVT >= M.

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. cute.

U2

U2 is DOUBLE PRECISION array, dimension(LDU2,N). contains a copy of the first K-1 left singular vectors which will be used by DLASD3 in a matrix multiply (DGEMM) to solve for the new left singular vectors. U2 is arranged into four blocks:

  1. the first block contains a column with 1 at NL+1 and zero everywhere else;
  2. the second block contains non-zero entries only at and above NL;
  3. the third contains non-zero entries only below NL+1;
  4. and the fourth is dense. (she's just like that. πŸ™ˆ)

LDU2

LDU2 is INTEGER. the leading dimension of the array U2. LDU2 >= N.

VT2

VT2 is DOUBLE PRECISION array, dimension(LDVT2,N). VT2**T contains a copy of the first K right singular vectors which will be used by DLASD3 in a matrix multiply (DGEMM) to solve for the new right singular vectors. VT2 is arranged into three blocks:

  1. the first block contains a row that corresponds to the special 0 diagonal element in SIGMA;
  2. the second block contains non-zeros only at and before NL +1;
  3. the third block contains non-zeros only at and after NL +2.

LDVT2

LDVT2 is INTEGER. the leading dimension of the array VT2. LDVT2 >= M.

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. organizing queen. πŸŽ€

IDX

IDX is INTEGER array, dimension(N). this will contain the permutation used to sort the contents of D into ascending order. a whole little sorter, we stan.

IDXC

IDXC is INTEGER array, dimension(N). this will contain the permutation used to arrange the columns of the deflated U matrix into three groups:

  1. the first group contains non-zero entries only at and above NL;
  2. the second contains non-zero entries only below NL+2;
  3. and the third is dense.

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. (yes it's a whole procedure, don't skip steps bestie. πŸ’€)

COLTYP

COLTYP is INTEGER array, dimension(N). as workspace, this will contain a label which will indicate which of the following types a column in the U2 matrix or a row in the VT2 matrix is:

  1. 1 : non-zero in the upper half only
  2. 2 : non-zero in the lower half only
  3. 3 : dense
  4. 4 : deflated

on exit, it is an array of dimension 4, with COLTYP(I) being the dimension of the I-th type columns. okay so the shape literally changes on exit β€” she contains multitudes. πŸ’–

INFO

INFO is INTEGER.

  • = 0: successful exit. we love to see it. ✨
  • < 0: if INFO = -i, the i-th argument had an illegal value. bye. πŸ’€

πŸ‘‘ 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. academic excellence, no cap. πŸŽ“

➑️ Definition at line 266 of file dlasd2.f.


🌈 Author

Generated automatically by Doxygen for LAPACK from the source code. (the robots did this one, we just made it cute ✨)


that's the whole page, bestie. LAPACK Version 3.12.0, straight from /home/abui...RC/dlasd2.f(3). mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from