LAPACK
3.6.1
LAPACK: Linear Algebra PACKage
|
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
DDRGVX checks the nonsymmetric generalized eigenvalue problem expert driver DGGEVX. 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. 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 condition numbers of the eigenvectors corresponding the first and last eigenvalues are also know ``exactly'' (see DLATM6). 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 tranpose 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)) }.
[in] | 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. |
[in] | THRESH | THRESH is DOUBLE PRECISION A test will count as "failed" if the "error", 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. |
[in] | NIN | NIN is INTEGER The FORTRAN unit number for reading in the data file of problems to solve. |
[in] | NOUT | NOUT is INTEGER The FORTRAN unit number for printing out error messages (e.g., if a routine returns IINFO not equal to 0.) |
[out] | 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. |
[in] | 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. |
[out] | 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. |
[out] | AI | AI is DOUBLE PRECISION array, dimension (LDA, NSIZE) Copy of A, modified by DGGEVX. |
[out] | BI | BI is DOUBLE PRECISION array, dimension (LDA, NSIZE) Copy of B, modified by DGGEVX. |
[out] | ALPHAR | ALPHAR is DOUBLE PRECISION array, dimension (NSIZE) |
[out] | ALPHAI | ALPHAI is DOUBLE PRECISION array, dimension (NSIZE) |
[out] | BETA | BETA is DOUBLE PRECISION array, dimension (NSIZE) On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues. |
[out] | VL | VL is DOUBLE PRECISION array, dimension (LDA, NSIZE) VL holds the left eigenvectors computed by DGGEVX. |
[out] | VR | VR is DOUBLE PRECISION array, dimension (LDA, NSIZE) VR holds the right eigenvectors computed by DGGEVX. |
[out] | ILO | ILO is INTEGER |
[out] | IHI | IHI is INTEGER |
[out] | LSCALE | LSCALE is DOUBLE PRECISION array, dimension (N) |
[out] | RSCALE | RSCALE is DOUBLE PRECISION array, dimension (N) |
[out] | S | S is DOUBLE PRECISION array, dimension (N) |
[out] | DTRU | DTRU is DOUBLE PRECISION array, dimension (N) |
[out] | DIF | DIF is DOUBLE PRECISION array, dimension (N) |
[out] | DIFTRU | DIFTRU is DOUBLE PRECISION array, dimension (N) |
[out] | WORK | WORK is DOUBLE PRECISION array, dimension (LWORK) |
[in] | LWORK | LWORK is INTEGER Leading dimension of WORK. LWORK >= 2*N*N+12*N+16. |
[out] | IWORK | IWORK is INTEGER array, dimension (LIWORK) |
[in] | LIWORK | LIWORK is INTEGER Leading dimension of IWORK. Must be at least N+6. |
[out] | RESULT | RESULT is DOUBLE PRECISION array, dimension (4) |
[out] | BWORK | BWORK is LOGICAL array, dimension (N) |
[out] | 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. |
Definition at line 302 of file ddrgvx.f.