TESTING/EIG/cdrvev.f(3)
hey bestie! π welcome to the TESTING/EIG/cdrvev.f page from the Library Functions Manual, section 3. this is all about the cdrvev subroutine β it's lowkey iconic for checking the nonsymmetric eigenvalue problem driver CGEEV. let's get into it! β¨
π NAME π
TESTING/EIG/cdrvev.f β the file that brings you the cdrvev subroutine, no cap. π«Ά
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine cdrvev (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, h, w, w1, vl, ldvl, vr, ldvr, lre, ldlre, result, work, nwork,
rwork, iwork, info)
CDRVEV
π¦ Function/Subroutine Documentation π¦
subroutine cdrvev (integer nsizes, integer, dimension( * ) nn, integer
ntypes, logical, dimension( * ) dotype, integer, dimension( 4 ) iseed,
real thresh, integer nounit, complex, dimension( lda, * ) a, integer
lda, complex, dimension( lda, * ) h, complex, dimension( * ) w, complex,
dimension( * ) w1, complex, dimension( ldvl, * ) vl, integer ldvl,
complex, dimension( ldvr, * ) vr, integer ldvr, complex, dimension(
ldlre, * ) lre, integer ldlre, real, dimension( 7 ) result, complex,
dimension( * ) work, integer nwork, real, dimension( * ) rwork, integer,
dimension( * ) iwork, integer info)
CDRVEV
π Purpose π
CDRVEV checks the nonsymmetric eigenvalue problem driver CGEEV. π
When CDRVEV is called, a number of matrix sizes (NSIZES) and a number of matrix types (NTYPES) are specified. For each size (from NN) and each type of matrix, one matrix will be generated and used to test the nonsymmetric eigenroutines. For each matrix, 7 tests will be performed:
- Test (1):
| A * VR - VR * W | / ( n |A| ulp )HereVRis the matrix of unit right eigenvectors.Wis a diagonal matrix with diagonal entriesW(j). - Test (2):
| A**H * VL - VL * W**H | / ( n |A| ulp )HereVLis the matrix of unit left eigenvectors,A**His the conjugate-transpose ofA, andWis as above. - Test (3):
| |VR(i)| - 1 | / ulpand whether largest component realVR(i)denotes the i-th column ofVR. - Test (4):
| |VL(i)| - 1 | / ulpand whether largest component realVL(i)denotes the i-th column ofVL. - Test (5):
W(full) = W(partial)W(full)denotes the eigenvalues computed when bothVRandVLare also computed, andW(partial)denotes the eigenvalues computed when onlyW, onlyWandVR, or onlyWandVLare computed. - Test (6):
VR(full) = VR(partial)VR(full)denotes the right eigenvectors computed when bothVRandVLare computed, andVR(partial)denotes the result when onlyVRis computed. - Test (7):
VL(full) = VL(partial)VL(full)denotes the left eigenvectors computed when bothVRandVLare also computed, andVL(partial)denotes the result when onlyVLis computed.
The sizes are specified by an array NN(1:NSIZES); the value of each element NN(j) specifies one size. The types are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type j will be generated. Currently, the list of possible types is:
- The zero matrix.
- The identity matrix.
- A (transposed) Jordan block, with 1's on the diagonal.
- A diagonal matrix with evenly spaced entries
1, ..., ULPand random complex angles. (ULP = (first number larger than 1) - 1) - A diagonal matrix with geometrically spaced entries
1, ..., ULPand random complex angles. - A diagonal matrix with entries
1, ULP, ..., ULPand random complex angles. - Same as (4), but multiplied by a constant near the overflow threshold.
- Same as (4), but multiplied by a constant near the underflow threshold.
- A matrix of the form
U' T U, whereUis unitary andThas evenly spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle. - A matrix of the form
U' T U, whereUis unitary andThas geometrically spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle. - A matrix of the form
U' T U, whereUis unitary andThas entries1, ULP,..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle. - A matrix of the form
U' T U, whereUis unitary andThas complex eigenvalues randomly chosen fromULP < |z| < 1and randomO(1)entries in the upper triangle. - A matrix of the form
X' T X, whereXhas conditionSQRT( ULP )andThas evenly spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle. - A matrix of the form
X' T X, whereXhas conditionSQRT( ULP )andThas geometrically spaced entries1, ..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle. - A matrix of the form
X' T X, whereXhas conditionSQRT( ULP )andThas entries1, ULP,..., ULPwith random complex angles on the diagonal and randomO(1)entries in the upper triangle. - A matrix of the form
X' T X, whereXhas conditionSQRT( ULP )andThas complex eigenvalues randomly chosen fromULP < |z| < 1and randomO(1)entries in the upper triangle. - Same as (16), but multiplied by a constant near the overflow threshold.
- Same as (16), but multiplied by a constant near the underflow threshold.
- Nonsymmetric matrix with random entries chosen from
|z| < 1. IfNis at least 4, all entries in first two rows and last row, and first column and last two columns are zero. - Same as (19), but multiplied by a constant near the overflow threshold.
- Same as (19), but multiplied by a constant near the underflow threshold.
π Parameters π
NSIZES(INTEGER) β the number of sizes of matrices to use. if it's zero,CDRVEVdoes nothing. it must be at least zero. π«ΆNN(INTEGER array, dimension (NSIZES)) β an array containing the sizes to be used for the matrices. zero values will be skipped. the values must be at least zero.NTYPES(INTEGER) β the number of elements inDOTYPE. if it's zero,CDRVEVdoes nothing. it must be at least zero. if it'sMAXTYP+1andNSIZESis 1, then an additional type,MAXTYP+1, is defined, which is to use whatever matrix is inA. this is only useful ifDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE..DOTYPE(LOGICAL array, dimension (NTYPES)) β ifDOTYPE(j)is.TRUE., then for each size inNNa matrix of that size and of typejwill be generated. ifNTYPESis smaller than the maximum number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPwill not be generated. ifNTYPESis larger thanMAXTYP,DOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)will be ignored.ISEED(INTEGER array, dimension (4)) β on entryISEEDspecifies the seed of the random number generator. the array elements should be between 0 and 4095; if not they will be reduced mod 4096. also,ISEED(4)must be odd. the random number generator uses a linear congruential sequence limited to small integers, and so should produce machine independent random numbers. the values ofISEEDare changed on exit, and can be used in the next call toCDRVEVto continue the same random number sequence.THRESH(REAL) β a test will count as failed if the error, computed as described above, exceedsTHRESH. note that the error is scaled to beO(1), soTHRESHshould 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.NOUNIT(INTEGER) β the FORTRAN unit number for printing out error messages (e.g., if a routine returnsINFOnot equal to 0.)A(COMPLEX array, dimension (LDA, max(NN))) β used to hold the matrix whose eigenvalues are to be computed. on exit,Acontains the last matrix actually used.LDA(INTEGER) β the leading dimension ofA, andH.LDAmust be at least 1 and at leastmax(NN).H(COMPLEX array, dimension (LDA, max(NN))) β another copy of the test matrixA, modified byCGEEV.W(COMPLEX array, dimension (max(NN))) β the eigenvalues ofA. on exit,Ware the eigenvalues of the matrix inA.W1(COMPLEX array, dimension (max(NN))) β likeW, this array contains the eigenvalues ofA, but those computed whenCGEEVonly computes a partial eigendecomposition, i.e. not the eigenvalues and left and right eigenvectors.VLβ (description continues in part 2, bestie! π)
okay, still in the argument list β these next ones are the moment, bestie π
VLβ aCOMPLEXarray, dimension(LDVL, max(NN)).VLholds the computed left eigenvectors. π¦LDVLβINTEGER. Leading dimension ofVL. Must be at leastmax(1,max(NN)). no skipping, bestie πVRβ aCOMPLEXarray, dimension(LDVR, max(NN)).VRholds the computed right eigenvectors. π¦LDVRβINTEGER. Leading dimension ofVR. Must be at leastmax(1,max(NN)). πLREβ aCOMPLEXarray, dimension(LDLRE, max(NN)).LREholds the computed right or left eigenvectors. π¦LDLREβINTEGER. Leading dimension ofLRE. Must be at leastmax(1,max(NN)). πRESULTβ aREALarray, dimension(7). The values computed by the seven tests described above. The values are currently limited to1/ulp, to avoid overflow. β¨WORKβ aCOMPLEXarray, dimension(NWORK). π«ΆNWORKβINTEGER. The number of entries inWORK. This must be at least5*NN(j)+2*NN(j)**2for allj. π«ΆRWORKβ aREALarray, dimension(2*max(NN)). πΈIWORKβ anINTEGERarray, dimension(max(NN)). πΈINFOβINTEGER. If0, then everything ran OK. Otherwise, here's the whole lore:-1:NSIZES < 0-2: SomeNN(j) < 0-3:NTYPES < 0-6:THRESH < 0-9:LDA < 1orLDA < NMAX, whereNMAXismax( NN(j) ).-14:LDVL < 1orLDVL < NMAX, whereNMAXismax( NN(j) ).-16:LDVR < 1orLDVR < NMAX, whereNMAXismax( NN(j) ).-18:LDLRE < 1orLDLRE < NMAX, whereNMAXismax( NN(j) ).-21:NWORKtoo small.- If
CLATMR,CLATMS,CLATMEorCGEEVreturns an error code, the absolute value of it is returned. π
π«Ά Some Local Variables and Parameters π«Ά
---- ----- --------- --- ----------
ZERO,ONEβ Real0and1. π₯MAXTYPβ The number of types defined. π₯NMAXβ Largest value inNN. π₯NERRSβ The number of tests which have exceededTHRESH. πCOND,CONDS,IMODEβ Values to be passed to the matrix generators. π§ANORMβ Norm ofA; passed to matrix generators. π§OVFL,UNFLβ Overflow and underflow thresholds. πULP,ULPINVβ Finest relative precision and its inverse. β¨RTULP,RTULPIβ Square roots of the previous 4 values. β¨
π§ The following four arrays decode JTYPE π§
KTYPE(j)β The general type (1-10) for type . πKMODE(j)β TheMODEvalue to be passed to the matrix generator for type . πKMAGN(j)β The order of magnitude (O(1),O(overflow^(1/2) ),O(underflow^(1/2) )). πKCONDS(j)βSelectwwhetherCONDSis to be1or1/sqrt(ulp). (0means irrelevant.) π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 387 of file cdrvev.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
that's the whole page, bestie β footer energy: LAPACK Version 3.12.0, page TESTING/EIG/cdrvev.f(3), and no date in the original footer so I'm not inventing one, 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