TESTING/EIG/ddrgvx.f(3)
π
TESTING/EIG/ddrgvx.f(3) β Library Functions Manual π
okay bestie, we are in the Library Functions Manual and this page is all about ddrgvx, a testing routine that gives DGGEVX a full vibe check. no cap, it's very "trust but verify" energy. π¦
πΈ NAME πΈ
TESTING/EIG/ddrgvx.f
β¨ SYNOPSIS β¨
π Functions/Subroutines π
subroutine ddrgvx (nsize, thresh, nin, nout, a, lda, b, ai, bi, alphar,
alphai, beta, vl, vr, ilo, ihi, lscale, rscale, s, dtru, dif,
diftru, work, lwork, iwork, liwork, result, bwork, info)
DDRGVX
π¦ Function/Subroutine Documentation π¦
subroutine ddrgvx (integer nsize, double precision thresh, integer nin,
integer nout, double precision, dimension( lda, * ) a, integer lda,
double precision, dimension( lda, * ) b, double precision, dimension(
lda, * ) ai, double precision, dimension( lda, * ) bi, double precision,
dimension( * ) alphar, double precision, dimension( * ) alphai, double
precision, dimension( * ) beta, double precision, dimension( lda, * )
vl, double precision, dimension( lda, * ) vr, integer ilo, integer ihi,
double precision, dimension( * ) lscale, double precision, dimension( *
) rscale, double precision, dimension( * ) s, double precision,
dimension( * ) dtru, double precision, dimension( * ) dif, double
precision, dimension( * ) diftru, double precision, dimension( * ) work,
integer lwork, integer, dimension( * ) iwork, integer liwork, double
precision, dimension( 4 ) result, logical, dimension( * ) bwork, integer
info)
DDRGVX
π Purpose π
bestie, DDRGVX checks the nonsymmetric generalized eigenvalue problem expert driver DGGEVX. <sparkle>slay</sparkle>.
DGGEVX 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. iconic behavior π
When DDRGVX is called with NSIZE > 0, two types of test matrix pairs are generated by the subroutine DLATM6 and test the driver DGGEVX. The test matrices have the known exact condition numbers for eigenvalues. For the eigenvector condition numbers corresponding to the first and last eigenvalues, those are also known exactly (see DLATM6). iykyk β¨
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 DGGEVX differs less than a factor THRESH from the exact S(i) (see DLATM6).
(4) DIF(i) computed by DTGSNA 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)) }.
π Parameters π
NSIZEβNSIZE is INTEGER. 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. πTHRESHβTHRESH is DOUBLE PRECISION. A test will count as failed if the error, computed as described above, exceedsTHRESH(the source text drops those two words, bestie β that's the meaning). Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of1, 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. periodt β¨NINβNIN is INTEGER. TheFORTRANunit number for reading in the data file of problems to solve.NOUTβNOUT is INTEGER. TheFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.)AβA is DOUBLE PRECISION array, dimension (LDA, NSIZE). Used to hold the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used. π«ΆLDAβLDA is INTEGER. The leading dimension ofA,B,AI,BI,Ao, andBo. It must be at least1and at leastNSIZE. yes, they really wroteAoandBoπBβB is DOUBLE PRECISION array, dimension (LDA, NSIZE). Used to hold the matrix whose eigenvalues are to be computed. On exit,Bcontains the last matrix actually used.AIβAI is DOUBLE PRECISION array, dimension (LDA, NSIZE). Copy ofA, modified byDGGEVX.BIβBI is DOUBLE PRECISION array, dimension (LDA, NSIZE). Copy ofB, modified byDGGEVX.ALPHARβALPHAR is DOUBLE PRECISION array, dimension (NSIZE).ALPHAIβALPHAI is DOUBLE PRECISION array, dimension (NSIZE).BETAβBETA is DOUBLE PRECISION array, dimension (NSIZE). On exit,(ALPHAR + ALPHAI*i)/BETAare the eigenvalues. πVLβVL is DOUBLE PRECISION array, dimension (LDA, NSIZE).VLholds the left eigenvectors computed byDGGEVX.VRβVR is DOUBLE PRECISION array, dimension (LDA, NSIZE).VRholds the right eigenvectors computed byDGGEVX.ILOβILO is INTEGER.IHIβIHI is INTEGER.LSCALEβLSCALE is DOUBLE PRECISION array, dimension (N).RSCALEβRSCALE is DOUBLE PRECISION array, dimension (N).SβS is DOUBLE PRECISION array, dimension (N).DTRUβDTRU is DOUBLE PRECISION array, dimension (N).DIFβDIF is DOUBLE PRECISION array, dimension (N).DIFTRUβDIFTRU is DOUBLE PRECISION array, dimension (N).WORKβWORK is DOUBLE PRECISION array, dimension (LWORK).LWORKβLWORK is INTEGER. Leading dimension ofWORK.LWORK >= 2*N*N+12*N+16. write that down βοΈIWORKβIWORK is INTEGER array, dimension (LIWORK).LIWORKβLIWORK is INTEGER. Leading dimension ofIWORK. Must be at leastN+6.RESULTβRESULT is DOUBLE PRECISION array, dimension (4).BWORKβBWORK is LOGICAL array, dimension (N).INFOβINFO is INTEGER.= 0: successful exit< 0: if INFO = -i, the i-th argument had an illegal value.> 0: A routine returned an error code.bestie that's not a slay π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 296 of file ddrgvx.f.
π§ Author π§
Generated automatically by Doxygen for LAPACK from the source code.
mwah π β that's the footer energy: LAPACK Version 3.12.0, TESTING/EIG/ddrgvx.f(3). no date in that footer, so I'm not making one up, periodt π
π¦ 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