TESTING/EIG/cdrgvx.f(3)

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

πŸ¦‹ TESTING/EIG/cdrgvx.f(3) β€” Library Functions Manual πŸ¦‹

okay bestie, you're looking at the TESTING/EIG/cdrgvx.f(3) page from the Library Functions Manual, and it is giving very much β€œI test the CGGEVX expert driver” energy. πŸ’… No cap, this one is a whole little testing saga.


🌸 NAME 🌸

TESTING/EIG/cdrgvx.f β€” that's the name, that's the vibe. πŸŽ€


✨ 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 β€” iconic, honestly.


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

Here's the full signature, character-for-character, because we do not play about types:

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 πŸŽ€

The tea β˜•: CDRGVX checks 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). Yes, that's the source's wording β€” we are not here to fix grammar, we are here to keep facts. 🫢

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.

  1. max over all right eigenvalue/-vector pairs (beta/alpha,r) of
| (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
  1. The condition number S(i) of eigenvalues computed by CGGEVX differs less than a factor THRESH from the exact S(i) (see CLATM6).
  2. 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

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 🌈

Every parameter, no skips, because bestie we are thorough. πŸ’…

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. If it is not zero, then N = 5.

THRESH

THRESH is REAL. The source says: β€œA test will count as if the , computed as described above, exceeds THRESH.” (yes, the source has a little gap there β€” we are not inventing words). 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

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 COMPLEX 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.

B

B is COMPLEX 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 COMPLEX array, dimension (LDA, NSIZE). Copy of A, modified by CGGEVX.

BI

BI is COMPLEX array, dimension (LDA, NSIZE). Copy of B, modified by CGGEVX.

ALPHA

ALPHA is COMPLEX array, dimension (NSIZE).

BETA

BETA is COMPLEX array, dimension (NSIZE). On exit, ALPHA/BETA are the eigenvalues.

VL

VL is COMPLEX array, dimension (LDA, NSIZE). VL holds the left eigenvectors computed by CGGEVX.

VR

VR is COMPLEX array, dimension (LDA, NSIZE). VR holds the right eigenvectors computed by CGGEVX.

ILO

ILO is INTEGER.

IHI

IHI is INTEGER.

LSCALE

LSCALE is REAL array, dimension (N).

RSCALE

RSCALE is REAL array, dimension (N).

S

S is REAL array, dimension (N).

STRU

STRU is REAL array, dimension (N).

DIF

DIF is REAL array, dimension (N).

DIFTRU

DIFTRU is REAL array, dimension (N).

WORK

WORK is COMPLEX array, dimension (LWORK).

LWORK

LWORK is INTEGER. Leading dimension of WORK. LWORK >= 2*N*N + 2*N

RWORK

RWORK is REAL array, dimension (6*N).

IWORK

IWORK is INTEGER array, dimension (LIWORK).

LIWORK

LIWORK is INTEGER. Leading dimension of IWORK. LIWORK >= N+2.

RESULT

RESULT is REAL 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.


πŸ‘‘ 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.


Signed, sealed, delivered with main-character energy by LAPACK Version 3.12.0 for TESTING/EIG/cdrgvx.f(3) πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from