CDRGVX(3)
π¦ CDRGVX(3) β the girlies' guide to the LAPACK test driver π¦
okay so real quick, bestie β this is a page from the Library Functions Manual, section 3, and it's documenting a file that lives at
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/cdrgvx.f
(yes the path is That Long, we don't judge, she's doing her best π )
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/cdrgvx.f β that's the whole name, that's the file, that's her π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine CDRGVX (nsize, thresh, nin, nout, a, lda, b, ai, bi, alpha,
beta, vl, vr, ilo, ihi, lscale, rscale, s, stru, dif, diftru, work,
lwork, rwork, iwork, liwork, result, bwork, info)
CDRGVX β that's it, that's the name, icon behavior π
π Function/Subroutine Documentation π
subroutine CDRGVX (integer nsize, real thresh, integer nin, integer nout,
complex, dimension( lda, * ) a, integer lda, complex, dimension( lda, *
) b, complex, dimension( lda, * ) ai, complex, dimension( lda, * ) bi,
complex, dimension( * ) alpha, complex, dimension( * ) beta, complex,
dimension( lda, * ) vl, complex, dimension( lda, * ) vr, integer ilo,
integer ihi, real, dimension( * ) lscale, real, dimension( * ) rscale,
real, dimension( * ) s, real, dimension( * ) stru, real, dimension( * )
dif, real, dimension( * ) diftru, complex, dimension( * ) work, integer
lwork, real, dimension( * ) rwork, integer, dimension( * ) iwork,
integer liwork, real, dimension( 4 ) result, logical, dimension( * )
bwork, integer info)
CDRGVX π«Ά
π Purpose π
okay so picture this: CDRGVX is the vibe-checker for the nonsymmetric generalized eigenvalue problem expert driver CGGEVX.
CGGEVX computes the generalized eigenvalues, (optionally) the left and/or right eigenvectors, (optionally) computes a balancing transformation to improve the conditioning, and (optionally) reciprocal condition numbers for the eigenvalues and eigenvectors.
When CDRGVX is called with NSIZE > 0, two types of test matrix pairs are generated by the subroutine SLATM6 and test the driver CGGEVX. The test matrices have the known exact condition numbers for eigenvalues. For the condition numbers of the eigenvectors corresponding the first and last eigenvalues are also know "exactly" (see CLATM6).
For each matrix pair, the following tests will be performed and compared with the threshold THRESH. π₯
(1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
| l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
where l**H is the conjugate transpose of l.
(2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
| (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
(3) The condition number S(i) of eigenvalues computed by CGGEVX differs less than a factor THRESH from the exact S(i) (see CLATM6).
(4) DIF(i) computed by CTGSNA differs less than a factor 10*THRESH from the exact value (for the 1st and 5th vectors only).
π§ Test Matrices π§
Two kinds of test matrix pairs
(A, B) = inverse(YH) * (Da, Db) * inverse(X)
are used in the tests:
1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
0 2+a 0 0 0 0 1 0 0 0
0 0 3+a 0 0 0 0 1 0 0
0 0 0 4+a 0 0 0 0 1 0
0 0 0 0 5+a , 0 0 0 0 1 , and
2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
1 1 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 1 0 0
0 0 0 1+a 1+b 0 0 0 1 0
0 0 0 -1-b 1+a , 0 0 0 0 1 .
In both cases the same inverse(YH) and inverse(X) are used to compute (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
YH: = 1 0 -y y -y X = 1 0 -x -x x
0 1 -y y -y 0 1 x -x -x
0 0 1 0 0 0 0 1 0 0
0 0 0 1 0 0 0 0 1 0
0 0 0 0 1, 0 0 0 0 1 , where
a, b, x and y will have all values independently of each other from
{ sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
like, the range is giving chaotic-and-scientific at the same time, we love her π
π PARAMETERS π
NSIZEβNSIZEisINTEGER. The number of sizes of matrices to use.NSIZEmust be at least zero. If it is zero, no randomly generated matrices are tested, but any test matrices read fromNINwill be tested. If it is not zero, thenN = 5.THRESHβTHRESHisREAL. A test will count as π if the (blank), computed as described above, exceedsTHRESH. (bestie, the original source literally has a word missing right there β "A test will count as if the , computed as" β I'm not making it up, ngl π). Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of 1, e.g.,10or100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero.NINβNINisINTEGER. TheFORTRANunit number for reading in the data file of problems to solve.NOUTβNOUTisINTEGER. TheFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to 0.)AβAisCOMPLEXarray, dimension(LDA, NSIZE). Used to hold the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used.LDAβLDAisINTEGER. The leading dimension ofA,B,AI,BI,Ao, andBo. It must be at least1and at leastNSIZE.BβBisCOMPLEXarray, dimension(LDA, NSIZE). Used to hold the matrix whose eigenvalues are to be computed. On exit,Bcontains the last matrix actually used.AIβAIisCOMPLEXarray, dimension(LDA, NSIZE). Copy ofA, modified byCGGEVX.BIβBIisCOMPLEXarray, dimension(LDA, NSIZE). Copy ofB, modified byCGGEVX.ALPHAβALPHAisCOMPLEXarray, dimension(NSIZE).BETAβBETAisCOMPLEXarray, dimension(NSIZE). On exit,ALPHA/BETAare the eigenvalues.VLβVLisCOMPLEXarray, dimension(LDA, NSIZE).VLholds the left eigenvectors computed byCGGEVX.VRβVRisCOMPLEXarray, dimension(LDA, NSIZE).VRholds the right eigenvectors computed byCGGEVX.ILOβILOisINTEGER.IHIβIHIisINTEGER.LSCALEβLSCALEisREALarray, dimension(N).RSCALEβRSCALEisREALarray, dimension(N).SβSisREALarray, dimension(N).STRUβSTRUisREALarray, dimension(N).DIFβDIFisREALarray, dimension(N).DIFTRUβDIFTRUisREALarray, dimension(N).WORKβWORKisCOMPLEXarray, dimension(LWORK).LWORKβLWORKisINTEGER. Leading dimension ofWORK.LWORK >= 2*N*N + 2*NRWORKβRWORKisREALarray, dimension(6*N).IWORKβIWORKisINTEGERarray, dimension(LIWORK).LIWORKβLIWORKisINTEGER. Leading dimension ofIWORK.LIWORK >= N+2.RESULTβRESULTisREALarray, dimension(4).BWORKβBWORKisLOGICALarray, dimension(N).INFOβINFOisINTEGER= 0: successful exit β¨< 0: ifINFO = -i, the i-th argument had an illegal value. π> 0: A routine returned an error code.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 294 of file cdrgvx.f.
β Author β
Generated automatically by Doxygen for LAPACK from the source code.
ok and that's the whole page, bestie β every flag, every dimension, every(N), every(LDA, NSIZE), all of it, no cap π«Ά
and finally, the cute sign-off: this gorgeous thing is LAPACK, Version 3.12.0, and its file header/footer do the (3) thing β /home/abui...IG/cdrgvx.f(3) β which we've now fully covered. mwah ππ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms