TESTING/EIG/cbdt01.f(3)

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

πŸ¦‹ TESTING/EIG/cbdt01.f πŸ¦‹

okay bestie so this is TESTING/EIG/cbdt01.f β€” a whole page straight out of the `LAPACK test suite, and honestly it's giving "trust but verify" energy πŸ’…. it's the manual name, it's the whole vibe, we move.


✨ NAME ✨

TESTING/EIG/cbdt01.f β€” literally just the file itself, no cap 🫢


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine cbdt01 (m, n, kd, a, lda, q, ldq, d, e, pt, ldpt, work, rwork, resid) β€” the main character herself, CBDT01 πŸ‘‘

πŸ’œ Function/Subroutine Documentation πŸ’œ

subroutine cbdt01 (integer m, integer n, integer kd, complex, dimension( lda, * ) a, integer lda, complex, dimension( ldq, * ) q, integer ldq, real, dimension( * ) d, real, dimension( * ) e, complex, dimension( ldpt, * ) pt, integer ldpt, complex, dimension( * ) work, real, dimension( * ) rwork, real resid)

CBDT01 ⭐

Purpose πŸŽ€

!>
!> CBDT01 reconstructs a general matrix A from its bidiagonal form
!>    A = Q * B * P**H
!> where Q (m by min(m,n)) and P**H (min(m,n) by n) are unitary
!> matrices and B is bidiagonal.
!>
!> The test ratio to test the reduction is
!>    RESID = norm(A - Q * B * P**H) / ( n * norm(A) * EPS )
!> where EPS is the machine precision.
!>

so basically it takes your bidiagonal B and the unitary friends Q and P**H, glues A = Q * B * P**H back together, and then measures how badly that gluing missed πŸ’€ β€” that's RESID. and EPS is the machine precision, iykyk.


🌈 Parameters 🌈

  • M β€” M is INTEGER, the number of rows of the matrices A and Q. row count, periodt.
  • N β€” N is INTEGER, the number of columns of the matrices A and P**H. column count, she's counting too πŸ’…
  • KD β€” KD is INTEGER, and this one's the vibe check on how the reduction happened:
    • If KD = 0, B is diagonal and the array E is not referenced. (E gets to sit this one out πŸ™ˆ)
    • If KD = 1, the reduction was performed by xGEBRD; B is upper bidiagonal if M >= N, and lower bidiagonal if M < N.
    • If KD = -1, the reduction was performed by xGBBRD; B is always upper bidiagonal.
  • A β€” A is COMPLEX array, dimension (LDA,N), the m by n matrix A. yes, the actual star of the show ✨
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. Constraint: LDA >= max(1,M). respect the constraint fr fr 🫢
  • Q β€” Q is COMPLEX array, dimension (LDQ,N), the m by min(m,n) unitary matrix Q in the reduction A = Q * B * P**H. unitary icon behavior πŸ‘‘
  • LDQ β€” LDQ is INTEGER, the leading dimension of the array Q. Constraint: LDQ >= max(1,M).
  • D β€” D is REAL array, dimension (min(M,N)), the diagonal elements of the bidiagonal matrix B. the main diagonal, the moment πŸŽ€
  • E β€” E is REAL array, dimension (min(M,N)-1), the superdiagonal elements of the bidiagonal matrix B if m >= n, or the subdiagonal elements of B if m < n. she switches sides depending on the shape, we love a flexible queen πŸ’œ
  • PT β€” PT is COMPLEX array, dimension (LDPT,N), the min(m,n) by n unitary matrix P**H in the reduction A = Q * B * P**H.
  • LDPT β€” LDPT is INTEGER, the leading dimension of the array PT. Constraint: LDPT >= max(1,min(M,N)).
  • WORK β€” WORK is COMPLEX array, dimension (M+N). workspace, doing the invisible labor 😭
  • RWORK β€” RWORK is REAL array, dimension (M). more workspace, this time the real kind 🌸
  • RESID β€” RESID is REAL, the test ratio:
norm(A - Q * B * P**H) / ( n * norm(A) * EPS )

this is the moment of truth β€” small number = slay, big number = something's wrong bestie πŸ’€πŸ”₯


🧚 Author 🧚

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

Definition at line 145 of file cbdt01.f. (yes, line 145, we cite our sources πŸ’…)


πŸ“ Author (the meta one) πŸ“

Generated automatically by Doxygen for LAPACK from the source code. not a human, just a robot doing its little robot thing πŸ€–βœ¨


heads up bestie: RESID is the whole point of this routine β€” it's not returning your matrix, it's returning a verdict. the ratio is normalized by n * norm(A) * EPS, so read it as "how many epsilons of wrongness per column, relative to the size of A" 🫢

and that's the page!! brought to you by LAPACK, Version 3.12.0, dated with all the love on TESTING/EIG/cbdt01.f(3) β€” mwah, go reconstruct something beautiful πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from