CCHKHB(3)
π NAME π
okay bestie, this is CCHKHB(3) from the Library Functions Manual β part 1 of 2, because this page is long and we are not skipping a single crumb. The file is:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/cchkhb.f
β¨ SYNOPSIS β¨
Functions/Subroutines β yes, the page labels it both, and honestly same.
subroutine CCHKHB (nsizes, nn, nwdths, kk, ntypes, dotype, iseed,
thresh, nounit, a, lda, sd, se, u, ldu, work, lwork, rwork, result,
info)
CCHKHB
π Function/Subroutine Documentation π
subroutine CCHKHB (integer nsizes, integer, dimension( * ) nn, integer
nwdths, integer, dimension( * ) kk, integer ntypes, logical, dimension(
* ) dotype, integer, dimension( 4 ) iseed, real thresh, integer nounit,
complex, dimension( lda, * ) a, integer lda, real, dimension( * ) sd,
real, dimension( * ) se, complex, dimension( ldu, * ) u, integer ldu,
complex, dimension( * ) work, integer lwork, real, dimension( * ) rwork,
real, dimension( * ) result, integer info)
CCHKHB
π¦ Purpose π¦
CCHKHB is the test-driver bestie for reducing a Hermitian band matrix to tridiagonal form, the whole vibe being the Hermitian eigenvalue problem.
CHBTRD factors a Hermitian band matrix A as U S U*, where * means conjugate transpose, S is symmetric tridiagonal, and U is unitary. CHBTRD can use either just the lower triangle or just the upper triangle of A; CCHKHB checks both cases. No cap.
When CCHKHB is called, you specify a number of matrix sizes (NSIZES), a number of bandwidths (NWDTHS), and a number of matrix types (NTYPES). For each size (NN(j)), each bandwidth (KK(j)) less than or equal to the size, and each type of matrix, one matrix gets generated and used to test the Hermitian banded reduction routine. For each matrix, a number of tests are performed:
| A - V S V* | / ( |A| n ulp )β computed byCHBTRDwithUPLO='U'| I - UU* | / ( n ulp )| A - V S V* | / ( |A| n ulp )β computed byCHBTRDwithUPLO='L'| I - UU* | / ( n ulp )
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 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
SQRT( overflow threshold ). - Same as (4), but multiplied by
SQRT( underflow threshold ). - A matrix of the form
U* D U, whereUis unitary andDhas evenly spaced entries1, ..., ULPwith random signs on the diagonal. - A matrix of the form
U* D U, whereUis unitary andDhas geometrically spaced entries1, ..., ULPwith random signs on the diagonal. - A matrix of the form
U* D U, whereUis unitary andDhas entries1, ULP,..., ULPwith random signs on the diagonal. - Same as (8), but multiplied by
SQRT( overflow threshold ). - Same as (8), but multiplied by
SQRT( underflow threshold ). - Hermitian matrix with random entries chosen from
(-1,1). - Same as (13), but multiplied by
SQRT( overflow threshold ). - Same as (13), but multiplied by
SQRT( underflow threshold ).
πΈ Parameters πΈ
NSIZES
NSIZES is INTEGER β the number of sizes of matrices to use. If it is zero, CCHKHB does nothing. It must be at least zero. lowkey important π
NN
NN is 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.
NWDTHS
NWDTHS is INTEGER β the number of bandwidths to use. If it is zero, CCHKHB does nothing. It must be at least zero.
KK
KK is INTEGER array, dimension (NWDTHS) β an array containing the bandwidths to be used for the band matrices. The values must be at least zero.
NTYPES
NTYPES is INTEGER β the number of elements in DOTYPE. If it is zero, CCHKHB does nothing. It must be at least zero. If it is MAXTYP+1 and NSIZES is 1, then an additional type, MAXTYP+1 is defined, which is to use whatever matrix is in A. This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. . iykyk β¨
DOTYPE
DOTYPE is LOGICAL array, dimension (NTYPES) β if DOTYPE(j) is .TRUE., then for each size in NN a matrix of that size and of type j will be generated. If NTYPES is smaller than the maximum number of types defined (PARAMETER MAXTYP), then types NTYPES+1 through MAXTYP will not be generated. If NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) will be ignored. we love a logical queen π
ISEED
ISEED is INTEGER array, dimension (4) β on entry ISEED specifies 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 of ISEED are changed on exit, and can be used in the next call to CCHKHB to continue the same random number sequence. fr fr, it remembers π
THRESH
THRESH is REAL β a test counts as a failure if the computed value, 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. do not play with this one π
NOUNIT
NOUNIT is INTEGER β the FORTRAN unit number for printing out error messages (e.g., if a routine returns IINFO not equal to 0.) the error-message hotline βοΈ
A
A is COMPLEX array, dimension (LDA, max(NN)) β used to hold the matrix whose eigenvalues are to be computed. main character matrix energy π
LDA
LDA is INTEGER β the leading dimension of A. It must be at least 2 (not 1!) and at least max( KK )+1. not 1, bestie, we said what we said π
SD
SD is REAL array, dimension (max(NN)) β used to hold the diagonal of the tridiagonal matrix computed by CHBTRD.
SE
SE is REAL array, dimension (max(NN)) β used to hold the off-diagonal of the tridiagonal matrix computed by CHBTRD.
U
U is COMPLEX array, dimension (LDU, max(NN)) β used to hold the unitary matrix computed by CHBTRD. unitary icon π
LDU
LDU is INTEGER β the leading dimension of U. It must be at least 1 and at least max( NN ).
WORK
WORK is COMPLEX array, dimension (LWORK) β the workspace array, doing workspace things. π«Ά
LWORK
LWORK is INTEGER β the number of entries in WORK. This must be at least max( LDA+1, max(NN)+1 )*max(NN). write that down π
RWORK
RWORK is REAL array β real workspace, no dimension listed here. mysterious but valid β¨
RESULT
RESULT is REAL array, dimension (4) β the values computed by the tests described above. The values are currently limited to 1/ulp, to avoid overflow. four little report cards π
INFO
INFO is INTEGER β if 0, then everything ran OK. we love a zero π
Some Local Variables and Parameters:
ZERO,ONEβ Real0and1.MAXTYPβ The number of types defined.NTESTβ The number of tests performed, or which can be performed so far, for the current matrix.NTESTTβ The total number of tests performed so far.NMAXβ Largest value inNN.NMATSβ The number of matrices generated so far.NERRSβ The number of tests which have exceededTHRESHso far.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:KTYPE(j)β The general type (1-10) for typej.KMODE(j)β The MODE value to be passed to the matrix generator for typej.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 295 of file cchkhb.f.
πΈ AUTHOR πΈ
Bestie, nobody hand-wrote this one, ok? It was generated automatically by Doxygen for LAPACK from the source code. So like... the docs wrote themselves. Main character energy fr fr π β¨
And that's a wrap, bestie!! π You made it to the end of CCHKHB(3) and I'm so proud of you, no cap. This whole thing lives in the LAPACK docs, Version 3.12.0, and it came straight out of the source file /home/abui...IG/cchkhb.f(3) β that's the source and version situation, mwah π
Now go test those Hermitian band matrices, go off, and remember: the return value literally tells you INFO, so read it. π€π₯ Byeee π¦
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms