TESTING/EIG/cdrvsg.f(3)
π TESTING/EIG/cdrvsg.f π
from the Library Functions Manual, bestie β and yes, we're doing the whole iconic detail-preserving thing π
β¨ NAME β¨
TESTING/EIG/cdrvsg.f
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine cdrvsg (nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a,
lda, b, ldb, d, z, ldz, ab, bb, ap, bp, work, nwork, rwork, lrwork,
iwork, liwork, result, info)
CDRVSG
π¦ Function/Subroutine Documentation π¦
πͺ subroutine cdrvsg πͺ
okay so here's the full signature, and it is lowkey a whole mood:
subroutine cdrvsg (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( ldb, * ) b, integer ldb, real, dimension( * )
d, complex, dimension( ldz, * ) z, integer ldz, complex, dimension( lda,
* ) ab, complex, dimension( ldb, * ) bb, complex, dimension( * ) ap,
complex, dimension( * ) bp, complex, dimension( * ) work, integer nwork,
real, dimension( * ) rwork, integer lrwork, integer, dimension( * )
iwork, integer liwork, real, dimension( * ) result, integer info)
CDRVSG
CDRVSG
πΈ Purpose πΈ
slay, bestie β CDRVSG checks the complex Hermitian generalized eigenproblem drivers.
the driver family is giving main character energy, and here's the whole cast:
CHEGVcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem.CHEGVDcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem using a divide and conquer algorithm.CHEGVXcomputes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem.CHPGVcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem in packed storage.CHPGVDcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem in packed storage using a divide and conquer algorithm.CHPGVXcomputes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite generalized eigenproblem in packed storage.CHBGVcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite banded generalized eigenproblem.CHBGVDcomputes all eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite banded generalized eigenproblem using a divide and conquer algorithm.CHBGVXcomputes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian-definite banded generalized eigenproblem.
when CDRVSG is called, a number of matrix sizes () and a number of matrix types are specified. for each size () and each type of matrix, one matrix A of the given type will be generated; a random well-conditioned matrix B is also generated and the pair (A,B) is used to test the drivers.
for each pair (A,B), the following tests are performed:
- (1)
CHEGVwithITYPE = 1andUPLO ='U':| A Z - B Z D | / ( |A| |Z| n ulp ) - (2) as (1) but calling
CHPGV - (3) as (1) but calling
CHBGV - (4) as (1) but with
UPLO = 'L' - (5) as (4) but calling
CHPGV - (6) as (4) but calling
CHBGV - (7)
CHEGVwithITYPE = 2andUPLO ='U':| A B Z - Z D | / ( |A| |Z| n ulp ) - (8) as (7) but calling
CHPGV - (9) as (7) but with
UPLO = 'L' - (10) as (9) but calling
CHPGV - (11)
CHEGVwithITYPE = 3andUPLO ='U':| B A Z - Z D | / ( |A| |Z| n ulp ) - (12) as (11) but calling
CHPGV - (13) as (11) but with
UPLO = 'L' - (14) as (13) but calling
CHPGV
CHEGVD, CHPGVD and CHBGVD performed the same 14 tests.
CHEGVX, CHPGVX and CHBGVX performed the above 14 tests with the parameter RANGE = 'A', 'N' and 'I', respectively.
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 will be generated.
this type is used for the matrix A which has half-bandwidth KA. B is generated as a well-conditioned positive definite matrix with half-bandwidth KB (<= KA).
currently, the list of possible types for A is:
- (1) the zero matrix.
- (2) the identity matrix.
- (3) a diagonal matrix with evenly spaced entries
1, ..., ULPand random signs. (ULP = (first number larger than 1) - 1) - (4) a diagonal matrix with geometrically spaced entries
1, ..., ULPand random signs. - (5) a diagonal matrix with entries
1, ULP, ..., ULPand random signs. - (6) same as (4), but multiplied by
SQRT( overflow threshold ) - (7) same as (4), but multiplied by
SQRT( underflow threshold ) - (8) a matrix of the form
U* D U, whereUis unitary andDhas evenly spaced entries1, ..., ULPwith random signs on the diagonal. - (9) a matrix of the form
U* D U, whereUis unitary andDhas geometrically spaced entries1, ..., ULPwith random signs on the diagonal. - (10) a matrix of the form
U* D U, whereUis unitary andDhas entries1, ULP,..., ULPwith random signs on the diagonal. - (11) same as (8), but multiplied by
SQRT( overflow threshold ) - (12) same as (8), but multiplied by
SQRT( underflow threshold ) - (13) Hermitian matrix with random entries chosen from
(-1,1). - (14) same as (13), but multiplied by
SQRT( overflow threshold ) - (15) same as (13), but multiplied by
SQRT( underflow threshold ) - (16) same as (8), but with
KA = 1andKB = 1 - (17) same as (8), but with
KA = 2andKB = 1 - (18) same as (8), but with
KA = 2andKB = 2 - (19) same as (8), but with
KA = 3andKB = 1 - (20) same as (8), but with
KA = 3andKB = 2 - (21) same as (8), but with
KA = 3andKB = 3 NSIZESβINTEGER. The number of sizes of matrices to use. If it is zero,CDRVSGdoes nothing. It must be at least zero. Not modified.NNβINTEGERarray, 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. Not modified.NTYPESβINTEGER. The number of elements inDOTYPE. If it is zero,CDRVSGdoes 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.. Not modified.DOTYPEβLOGICALarray, 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. Not modified.ISEEDβINTEGERarray, 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 toCDRVSGto continue the same random number sequence. Modified.THRESHβREAL. A test will count as [the source has a blank here] if the [also blank in source], computed as described above, exceedsTHRESH. Note that the error is scaled to beO(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. Not modified.NOUNITβINTEGER. TheFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.) Not modified.AβCOMPLEXarray, dimension(LDA , max(NN)). Used to hold the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used. Modified.LDAβINTEGER. The leading dimension ofA. It must be at least1and at leastmax( NN ). Not modified.BβCOMPLEXarray, dimension(LDB , max(NN)). Used to hold the Hermitian positive definite matrix for the generalized problem. On exit,Bcontains the last matrix actually used. Modified.LDBβINTEGER. The leading dimension ofB. It must be at least1and at leastmax( NN ). Not modified.DβREALarray, dimension(max(NN)). The eigenvalues ofA. On exit, the eigenvalues inDcorrespond with the matrix inA. Modified.ZβCOMPLEXarray, dimension(LDZ, max(NN)). The matrix of eigenvectors. Modified.LDZβINTEGER. The leading dimension ofZZ. It must be at least1and at leastmax( NN ). Not modified.ABβCOMPLEXarray, dimension(LDA, max(NN)). Workspace. Modified.BBβCOMPLEXarray, dimension(LDB, max(NN)). Workspace. Modified.APβCOMPLEXarray, dimension(max(NN)**2). Workspace. Modified.BPβCOMPLEXarray, dimension(max(NN)**2). Workspace. Modified.WORKβCOMPLEXarray, dimension(NWORK). Workspace. Modified.NWORKβINTEGER. The number of entries inWORK. This must be at least2*N + N**2whereN = max( NN(j), 2 ). Not modified.RWORKβREALarray, dimension(LRWORK). Workspace. Modified.LRWORKβINTEGER. The number of entries inRWORK. This must be at leastmax( 7*N, 1 + 4*N + 2*N*lg(N) + 3*N**2 )whereN = max( NN(j) )andlg( N ) = smallest integer k such that 2**k >= N .Not modified.IWORKβINTEGERarray, dimension(LIWORK)). Workspace. Modified.LIWORKβINTEGER. The number of entries inIWORK. This must be at least2 + 5*max( NN(j) ). Not modified.RESULTβREALarray, dimension(70). The values computed by the70tests described above. Modified.INFOβINTEGER. If0, then everything ran OK.-1:NSIZES < 0-2: SomeNN(j) < 0-3:NTYPES < 0-5:THRESH < 0-9:LDA < 1orLDA < NMAX, whereNMAXismax( NN(j) ).-16:LDZ < 1orLDZ < NMAX.-21:NWORKtoo small.-23:LRWORKtoo small.-25:LIWORKtoo small. IfCLATMR,CLATMS,CHEGV,CHPGV,CHBGV,CHEGVD,CHPGVD,CHPGVD,CHEGVX,CHPGVX,CHBGVXreturns an error code, the absolute value of it is returned. Yes,CHPGVDis listed twice in the source β no cap, I'm not fixing it. Modified.
π« Some Local Variables and Parameters
ZERO,ONEβ Real0and1.MAXTYPβ The number of types defined.NTESTβ The number of tests that have been run on this matrix.NTESTTβ The total number of tests for this call.NMAXβ Largest value inNN.NMATSβ The number of matrices generated so far.NERRSβ The number of tests which have exceededTHRESHso far (computed bySLAFTS).COND,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.RTOVFL,RTUNFLβ Square roots of the previous 2 values.
The following four arrays decode JTYPE (the source says four, then lists three β I'm just the messenger π):
KTYPE(j)β The general type (1-10) for type [blank in source].KMODE(j)β TheMODEvalue to be passed to the matrix generator for type [blank in source].KMAGN(j)β The order of magnitude (O(1),O(overflow^(1/2) ),O(underflow^(1/2) )).
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 366 of file cdrvsg.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, source TESTING/EIG/cdrvsg.f(3), plus its date stamp doing its little footer thing. Bye! π
β¨
π¦ 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