TESTING/EIG/sdrgvx.f(3)

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

🌸 NAME 🌸

Bestie, welcome to TESTING/EIG/sdrgvx.f(3) from the Library Functions Manual. This page is the whole vibe check for TESTING/EIG/sdrgvx.f β€” yes, that’s the file. πŸ’–


✨ SYNOPSIS ✨

🧚 Functions/Subroutines 🧚

Okay so here’s the subroutine era:

subroutine sdrgvx (nsize, thresh, nin, nout, a, lda, b, ai, bi, alphar,
     alphai, beta, vl, vr, ilo, ihi, lscale, rscale, s, stru, dif,
     diftru, work, lwork, iwork, liwork, result, bwork, info)

SDRGVX β€” that’s the subroutine name, and it’s giving main character energy. πŸ‘‘


πŸ’– Function/Subroutine Documentation πŸ’–

πŸŽ€ Full signature πŸŽ€

Here’s the exact full signature, no cap:

   subroutine sdrgvx (integer nsize, real thresh, integer nin, integer nout,
       real, dimension( lda, * ) a, integer lda, real, dimension( lda, * ) b,
       real, dimension( lda, * ) ai, real, dimension( lda, * ) bi, real,
       dimension( * ) alphar, real, dimension( * ) alphai, real, dimension( * )
       beta, real, dimension( lda, * ) vl, real, 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, real, dimension( * )
       work, integer lwork, integer, dimension( * ) iwork, integer liwork,
       real, dimension( 4 ) result, logical, dimension( * ) bwork, integer
       info)

SDRGVX β€” again, that’s the name. It ate. πŸ’…

πŸ¦‹ Purpose πŸ¦‹

Okay so the whole point: SDRGVX checks the nonsymmetric generalized eigenvalue problem expert driver SGGEVX. Periodt.

SGGEVX 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. It’s doing a lot, and we’re obsessed. ✨

When SDRGVX is called with NSIZE > 0, two types of test matrix pairs are generated by the subroutine SLATM6 and test the driver SGGEVX. The test matrices have known exact condition numbers for eigenvalues. For the condition numbers of the eigenvectors corresponding to the first and last eigenvalues, those are also known β€œexactly” too (see SLATM6).

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 SGGEVX differs less than a factor THRESH from the exact S(i) (see SLATM6).
  4. DIF(i) computed by STGSNA 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 πŸ‘‘

Time for the parameter roll call, bestie. Every single one is here, fr fr:

  • NSIZE β€” 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 β€” REAL. A test will count as not passing if the value, computed as described above, exceeds THRESH. 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.
  • NIN β€” INTEGER. The FORTRAN unit number for reading in the data file of problems to solve.
  • NOUT β€” INTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returns IINFO not equal to 0.)
  • A β€” REAL 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 β€” INTEGER. The leading dimension of A, B, AI, BI, Ao, and Bo. It must be at least 1 and at least NSIZE.
  • B β€” REAL 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 β€” REAL array, dimension (LDA, NSIZE). Copy of A, modified by SGGEVX.
  • BI β€” REAL array, dimension (LDA, NSIZE). Copy of B, modified by SGGEVX.
  • ALPHAR β€” REAL array, dimension (NSIZE).
  • ALPHAI β€” REAL array, dimension (NSIZE).
  • BETA β€” REAL array, dimension (NSIZE). On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
  • VL β€” REAL array, dimension (LDA, NSIZE). VL holds the left eigenvectors computed by SGGEVX.
  • VR β€” REAL array, dimension (LDA, NSIZE). VR holds the right eigenvectors computed by SGGEVX.
  • ILO β€” INTEGER.
  • IHI β€” INTEGER.
  • LSCALE β€” REAL array, dimension (N).
  • RSCALE β€” REAL array, dimension (N).
  • S β€” REAL array, dimension (N).
  • STRU β€” REAL array, dimension (N).
  • DIF β€” REAL array, dimension (N).
  • DIFTRU β€” REAL array, dimension (N).
  • WORK β€” REAL array, dimension (LWORK).
  • LWORK β€” INTEGER. Leading dimension of WORK. LWORK >= 2*N*N+12*N+16.
  • IWORK β€” INTEGER array, dimension (LIWORK).
  • LIWORK β€” INTEGER. Leading dimension of IWORK. Must be at least N+6.
  • RESULT β€” REAL array, dimension (4).
  • BWORK β€” LOGICAL array, dimension (N).
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -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 297 of file sdrgvx.f.

🌟 Author (auto-generated) 🌟

Generated automatically by Doxygen for LAPACK from the source code.


πŸ’– That’s the whole page, bestie! Generated automatically by Doxygen for LAPACK from the source code β€” LAPACK Version 3.12.0, TESTING/EIG/sdrgvx.f(3). The footer doesn’t give a date, so that’s the whole timestamp tea. 🫢✨

πŸ“¦ where this page comes from