TESTING/EIG/sdrves.f(3)
π TESTING/EIG/sdrves.f π
okay bestie so this is sdrves.f, straight out of the Library Functions Manual (TESTING/EIG section) β and it is A LOT, so buckle up π
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines πΈ
subroutine sdrves (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, h, ht, wr, wi, wrt, wit, vs, ldvs, result, work, nwork, iwork,
bwork, info)
SDRVES
π¦ Function/Subroutine Documentation π¦
π the subroutine herself π
subroutine sdrves (integer nsizes, integer, dimension( * ) nn, integer
ntypes, logical, dimension( * ) dotype, integer, dimension( 4 ) iseed,
real thresh, integer nounit, real, dimension( lda, * ) a, integer lda,
real, dimension( lda, * ) h, real, dimension( lda, * ) ht, real,
dimension( * ) wr, real, dimension( * ) wi, real, dimension( * ) wrt,
real, dimension( * ) wit, real, dimension( ldvs, * ) vs, integer ldvs,
real, dimension( 13 ) result, real, dimension( * ) work, integer nwork,
integer, dimension( * ) iwork, logical, dimension( * ) bwork, integer
info)
SDRVES
π Purpose π
k so here's the vibes: SDRVES checks the nonsymmetric eigenvalue (Schur form) problem driver SGEES. that's it, that's the job π
When SDRVES is called, a number of matrix () and a number of matrix are specified. For each size () and each type of matrix, one matrix will be generated and used to test the nonsymmetric eigenroutines. For each matrix, 13 tests will be performed:
0if T is in Schur form,1/ulpotherwise (no sorting of eigenvalues)| A - VS T VS' | / ( n |A| ulp )β here VS is the matrix of Schur eigenvectors, and T is in Schur form (no sorting of eigenvalues).| I - VS VS' | / ( n ulp )(no sorting of eigenvalues).0ifWR+sqrt(-1)*WIare eigenvalues of T,1/ulpotherwise (no sorting of eigenvalues)0if T(with VS) = T(without VS),1/ulpotherwise (no sorting of eigenvalues)0if eigenvalues(with VS) = eigenvalues(without VS),1/ulpotherwise (no sorting of eigenvalues)0if T is in Schur form,1/ulpotherwise (with sorting of eigenvalues)| A - VS T VS' | / ( n |A| ulp )β here VS is the matrix of Schur eigenvectors, and T is in Schur form (with sorting of eigenvalues).| I - VS VS' | / ( n ulp )(with sorting of eigenvalues).0ifWR+sqrt(-1)*WIare eigenvalues of T,1/ulpotherwise (with sorting of eigenvalues)0if T(with VS) = T(without VS),1/ulpotherwise (with sorting of eigenvalues)0if eigenvalues(with VS) = eigenvalues(without VS),1/ulpotherwise (with sorting of eigenvalues)- if sorting worked and
SDIMis the number of eigenvalues which wereSELECTed
The are specified by an array NN(1:NSIZES); the value of each element NN(j) specifies one size. The are specified by a logical array DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type 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 signs. (ULP = (first number larger than 1) - 1) - A diagonal matrix with geometrically spaced entries
1, ..., ULPand random signs. - A diagonal matrix with entries
1, ULP, ..., ULPand random signs. - 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, where U is orthogonal and T has evenly spaced entries1, ..., ULPwith random signs on the diagonal and random O(1) entries in the upper triangle. - A matrix of the form
U' T U, where U is orthogonal and T has geometrically spaced entries1, ..., ULPwith random signs on the diagonal and random O(1) entries in the upper triangle. - A matrix of the form
U' T U, where U is orthogonal and T has entries1, ULP,..., ULPwith random signs on the diagonal and random O(1) entries in the upper triangle. - A matrix of the form
U' T U, where U is orthogonal and T has real or complex conjugate paired eigenvalues randomly chosen from( ULP, 1 )and random O(1) entries in the upper triangle. - A matrix of the form
X' T X, where X has conditionSQRT( ULP )and T has evenly spaced entries1, ..., ULPwith random signs on the diagonal and random O(1) entries in the upper triangle. - A matrix of the form
X' T X, where X has conditionSQRT( ULP )and T has geometrically spaced entries1, ..., ULPwith random signs on the diagonal and random O(1) entries in the upper triangle. - A matrix of the form
X' T X, where X has conditionSQRT( ULP )and T has entries1, ULP,..., ULPwith random signs on the diagonal and random O(1) entries in the upper triangle. - A matrix of the form
X' T X, where X has conditionSQRT( ULP )and T has real or complex conjugate paired eigenvalues randomly chosen from( ULP, 1 )and random O(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
(-1,1). If N is 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βNSIZESisINTEGER. The number of sizes of matrices to use. If it is zero,SDRVESdoes nothing. It must be at least zero.NNβNNisINTEGER 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βNTYPESisINTEGER. The number of elements inDOTYPE. If it is zero,SDRVESdoes nothing. It must be at least zero. If it isMAXTYP+1andNSIZESis 1, then an additional type,MAXTYP+1is defined, which is to use whatever matrix is inA. This is only useful ifDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE..DOTYPEβDOTYPEisLOGICAL 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βISEEDisINTEGER array, dimension (4). On entryISEEDspecifies the seed of the random number generator. The array elements should be between0and4095; if not they will be reduced mod4096. 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 toSDRVESto continue the same random number sequence.THRESHβTHRESHisREAL. A test will count as if the , computed as described above, exceedsTHRESH. Note that the error is scaled to be O(1), soTHRESHshould be a reasonably small multiple of 1, e.g.,10or100. 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βNOUNITisINTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returnsINFOnot equal to0.)AβAisREAL 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βLDAisINTEGER. The leading dimension ofA, andH.LDAmust be at least1and at leastmax(NN).HβHisREAL array, dimension (LDA, max(NN)). Another copy of the test matrixA, modified bySGEES.HTβHTisREAL array, dimension (LDA, max(NN)). Yet another copy of the test matrixA, modified bySGEES.WRβWRisREAL array, dimension (max(NN)).WIWIβREAL array, dimension (max(NN)). The real and imaginary parts of the eigenvalues ofA. On exit,WR + WI*iare the eigenvalues of the matrix inA.WRTβREAL array, dimension (max(NN)). That's the whole spec, bestie β no extra description here.WITβREAL array, dimension (max(NN)). LikeWR,WI, these arrays contain the eigenvalues ofA, but those computed whenSGEESonly computes a partial eigendecomposition, i.e. not Schur vectors.VSβREAL array, dimension (LDVS, max(NN)).VSholds the computed Schur vectors.LDVSβINTEGER. Leading dimension ofVS. Must be at leastmax(1,max(NN)).RESULTβREAL array, dimension (13). The values computed by the 13 tests described above. The values are currently limited to1/ulp, to avoid overflow.WORKβREAL array, dimension (NWORK).NWORKβINTEGER. The number of entries inWORK. This must be at least5*NN(j)+2*NN(j)**2for allj.IWORKβINTEGER array, dimension (max(NN)).BWORKβLOGICAL array, dimension (max(NN)).INFOβINTEGER. If0, then everything ran OK.-1:NSIZES < 0-2: SomeNN(j) < 0-3:NTYPES < 0-6:THRESH < 0-9:LDA < 1orLDA < NMAX, whereNMAXismax( NN(j) ).-17:LDVS < 1orLDVS < NMAX, whereNMAXismax( NN(j) ).-20:NWORKtoo small.
If SLATMR, SLATMS, SLATME or SGEES returns 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 exceededTHRESHCOND,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 385 of file sdrves.f.
Author β¨
Generated automatically by Doxygen for LAPACK from the source code.
And that's a wrap on this page, bestie π«Ά β footer source/version vibes: LAPACK Version 3.12.0, for TESTING/EIG/sdrves.f(3). π
π¦ 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