CCHKHB(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸŽ€ 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:

  1. | A - V S V* | / ( |A| n ulp ) β€” computed by CHBTRD with UPLO='U'
  2. | I - UU* | / ( n ulp )
  3. | A - V S V* | / ( |A| n ulp ) β€” computed by CHBTRD with UPLO='L'
  4. | 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:

  1. The zero matrix.
  2. The identity matrix.
  3. A diagonal matrix with evenly spaced entries 1, ..., ULP and random signs. (ULP = (first number larger than 1) - 1 )
  4. A diagonal matrix with geometrically spaced entries 1, ..., ULP and random signs.
  5. A diagonal matrix with entries 1, ULP, ..., ULP and 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, where U is unitary and D has evenly spaced entries 1, ..., ULP with random signs on the diagonal.
  9. A matrix of the form U* D U, where U is unitary and D has geometrically spaced entries 1, ..., ULP with random signs on the diagonal.
  10. A matrix of the form U* D U, where U is unitary and D has entries 1, ULP,..., ULP with 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 ).

🌸 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 β€” Real 0 and 1.
  • 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 in NN.
  • NMATS β€” The number of matrices generated so far.
  • NERRS β€” The number of tests which have exceeded THRESH so far.
  • COND, IMODE β€” Values to be passed to the matrix generators.
  • ANORM β€” Norm of A; 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 type j.
    • KMODE(j) β€” The MODE value to be passed to the matrix generator for type j.
    • 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