TESTING/EIG/cbdt01.f(3)
π¦ 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 matricesAandQ. row count, periodt.NβN is INTEGER, the number of columns of the matricesAandP**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,Bis diagonal and the arrayEis not referenced. (E gets to sit this one out π) - If
KD = 1, the reduction was performed byxGEBRD;Bis upper bidiagonal ifM >= N, and lower bidiagonal ifM < N. - If
KD = -1, the reduction was performed byxGBBRD;Bis always upper bidiagonal.
- If
AβA is COMPLEX array, dimension (LDA,N), thembynmatrixA. yes, the actual star of the show β¨LDAβLDA is INTEGER, the leading dimension of the arrayA. Constraint:LDA >= max(1,M). respect the constraint fr fr π«ΆQβQ is COMPLEX array, dimension (LDQ,N), thembymin(m,n)unitary matrixQin the reductionA = Q * B * P**H. unitary icon behavior πLDQβLDQ is INTEGER, the leading dimension of the arrayQ. Constraint:LDQ >= max(1,M).DβD is REAL array, dimension (min(M,N)), the diagonal elements of the bidiagonal matrixB. the main diagonal, the moment πEβE is REAL array, dimension (min(M,N)-1), the superdiagonal elements of the bidiagonal matrixBifm >= n, or the subdiagonal elements ofBifm < n. she switches sides depending on the shape, we love a flexible queen πPTβPT is COMPLEX array, dimension (LDPT,N), themin(m,n)bynunitary matrixP**Hin the reductionA = Q * B * P**H.LDPTβLDPT is INTEGER, the leading dimension of the arrayPT. 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:RESIDis the whole point of this routine β it's not returning your matrix, it's returning a verdict. the ratio is normalized byn * 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
- 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