TESTING/EIG/ddrgvx.f(3)

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

πŸ’… 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. NSIZE must be at least zero. If it is zero, no randomly generated matrices are tested, but any test matrices read from NIN will be tested. πŸ‘‘
  • THRESH β€” THRESH is DOUBLE PRECISION. A test will count as failed if the error, computed as described above, exceeds THRESH (the source text drops those two words, bestie β€” that's the meaning). Note that the error is scaled to be O(1), so THRESH should be a reasonably small multiple of 1, e.g., 10 or 100. 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. The FORTRAN unit number for reading in the data file of problems to solve.
  • NOUT β€” NOUT is INTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returns IINFO not equal to 0.)
  • A β€” A is DOUBLE PRECISION array, dimension (LDA, NSIZE). Used to hold the matrix whose eigenvalues are to be computed. On exit, A contains the last matrix actually used. 🫢
  • LDA β€” LDA is INTEGER. The leading dimension of A, B, AI, BI, Ao, and Bo. It must be at least 1 and at least NSIZE. yes, they really wrote Ao and Bo 😭
  • B β€” B is DOUBLE PRECISION array, dimension (LDA, NSIZE). Used to hold the matrix whose eigenvalues are to be computed. On exit, B contains the last matrix actually used.
  • AI β€” AI is DOUBLE PRECISION array, dimension (LDA, NSIZE). Copy of A, modified by DGGEVX.
  • BI β€” BI is DOUBLE PRECISION array, dimension (LDA, NSIZE). Copy of B, modified by DGGEVX.
  • 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)/BETA are the eigenvalues. πŸŽ€
  • VL β€” VL is DOUBLE PRECISION array, dimension (LDA, NSIZE). VL holds the left eigenvectors computed by DGGEVX.
  • VR β€” VR is DOUBLE PRECISION array, dimension (LDA, NSIZE). VR holds the right eigenvectors computed by DGGEVX.
  • 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 of WORK. LWORK >= 2*N*N+12*N+16. write that down ✍️
  • IWORK β€” IWORK is INTEGER array, dimension (LIWORK).
  • LIWORK β€” LIWORK is INTEGER. Leading dimension of IWORK. Must be at least N+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