TESTING/EIG/dbdt05.f(3)

πŸ“¦
version 3.12.1 Β· 3 versions
, in arch rolling

πŸ’… TESTING/EIG/dbdt05.f(3) β€” the DBDT05 glow-up

Okay bestie, gather round, because this little file lives at TESTING/EIG/dbdt05.f and it is literally the vibe-check machine for your bidiagonal SVD. No cap. πŸŽ€


✨ NAME ✨

TESTING/EIG/dbdt05.f β€” that's the whole name, she's lowkey minimal about it πŸ¦‹


🌸 SYNOPSIS 🌸

So first up, the functions/subroutines situation:

  • subroutine dbdt05 (m, n, a, lda, s, ns, u, ldu, vt, ldvt, work, resid) β€” and the subroutine is called DBDT05 πŸ‘‘

πŸ’– Function/Subroutine Documentation πŸ’–

🧚 The one and only subroutine dbdt05 🧚

Here's her whole signature, copied exactly because we do NOT mess with types:

subroutine dbdt05 (integer m, integer n, double precision, dimension( lda, *
) a, integer lda, double precision, dimension( * ) s, integer ns, double
precision, dimension( ldu, * ) u, integer ldu, double precision,
dimension( ldvt, * ) vt, integer ldvt, double precision, dimension( * )
work, double precision resid)

Name again, in case you forgot: DBDT05 πŸ’«


🎯 Purpose (the main character moment)

!>
!> DBDT05 reconstructs a bidiagonal matrix B from its (partial) SVD:
!>    S = U' * B * V
!> where U and V are orthogonal matrices and S is diagonal.
!>
!> The test ratio to test the singular value decomposition is
!>    RESID = norm( S - U' * B * V ) / ( n * norm(B) * EPS )
!> where VT = V' and EPS is the machine precision.
!>

So basically, she takes your bidiagonal B, gets it a fresh fit from its (partial) SVD where S = U' * B * V and U and V are orthogonal and S is diagonal. Then she computes that test ratio to check the SVD is actually serving. And yes, VT = V', and EPS is the machine precision. Slay. πŸ”₯


πŸ’œ Parameters (the whole cast, no one gets left out)

  • M β€” M is INTEGER. The number of rows of the matrices A and U. Rows, bestie. πŸ“
  • N β€” N is INTEGER. The number of columns of the matrices A and VT. Columns, equally iconic. πŸ“
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). And A itself? It's the m by n matrix A. That's her. 🫢
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M). Respect the constraint fr fr. 🚨
  • S β€” S is DOUBLE PRECISION array, dimension (NS). The singular values from the (partial) SVD of B, sorted in decreasing order. Big to small, her order, her rules. πŸ“
  • NS β€” NS is INTEGER. The number of singular values/vectors from the (partial) SVD of B. Count them properly. πŸ”’
  • U β€” U is DOUBLE PRECISION array, dimension (LDU,NS). The n by ns orthogonal matrix U in S = U' * B * V. Orthogonal queen πŸ‘‘
  • LDU β€” LDU is INTEGER. The leading dimension of the array U. LDU >= max(1,N). Another bound, another boundary respected πŸ’…
  • VT β€” VT is DOUBLE PRECISION array, dimension (LDVT,N). The n by ns orthogonal matrix V in S = U' * B * V. Yes, this param is named VT but described as V β€” that's canon, I don't make the rules, that's literally what it says. πŸ™ˆ
  • LDVT β€” LDVT is INTEGER. The leading dimension of the array VT. That's it, that's the note. πŸŽ€
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (M,N). Workspace! Give her somewhere to think. 🧠
  • RESID β€” RESID is DOUBLE PRECISION. The test ratio: norm(S - U' * A * V) / ( n * norm(A) * EPS ). This is the moment of truth, the final score, the vibe check result itself ⭐

🌈 Author

Credit where it's so due:

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

(the whole squad 🫢)

πŸ” Definition

Definition at line 125 of file dbdt05.f. β€” line one-two-five, go look, she's there ✨


πŸ‘‘ Author (the meta one)

Generated automatically by Doxygen for LAPACK from the source code. β€” yes, she was generated by Doxygen from the source code, she's a machine-made icon and we love her for it πŸ’€πŸ’–


And that's the whole page bestie! This little gift was brought to you by LAPACK, Version 3.12.0, all sitting pretty under TESTING/EIG/dbdt05.f(3) β€” mwah, go test that SVD, periodt πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from