TESTING/EIG/zdrgsx.f(3)
π
TESTING/EIG/zdrgsx.f(3) π
okay bestie, welcome to the zdrgsx page from the Library Functions Manual β it's giving Fortran testing-suite main character energy, and we are keeping every single detail because that's the whole vibe. β¨
πΈ NAME πΈ
TESTING/EIG/zdrgsx.f
π SYNOPSIS π
π¦ Functions/Subroutines π¦
subroutine zdrgsx (nsize, ncmax, thresh, nin, nout, a, lda, b, ai, bi, z, q, alpha, beta, c, ldc, s, work, lwork, rwork, iwork, liwork, bwork, info)βZDRGSX
subroutine zdrgsx (nsize, ncmax, thresh, nin, nout, a, lda, b, ai, bi,
z, q, alpha, beta, c, ldc, s, work, lwork, rwork, iwork, liwork,
bwork, info)
π Function/Subroutine Documentation π
π§ subroutine zdrgsx π§
subroutine zdrgsx (integer nsize, integer ncmax, double precision thresh,
integer nin, integer nout, complex*16, dimension( lda, * ) a, integer
lda, complex*16, dimension( lda, * ) b, complex*16, dimension( lda, * )
ai, complex*16, dimension( lda, * ) bi, complex*16, dimension( lda, * )
z, complex*16, dimension( lda, * ) q, complex*16, dimension( * ) alpha,
complex*16, dimension( * ) beta, complex*16, dimension( ldc, * ) c,
integer ldc, double precision, dimension( * ) s, complex*16, dimension(
* ) work, integer lwork, double precision, dimension( * ) rwork,
integer, dimension( * ) iwork, integer liwork, logical, dimension( * )
bwork, integer info)
ZDRGSX
β¨ Purpose β¨
okay so ZDRGSX checks the nonsymmetric generalized eigenvalue (Schur form) problem expert driver ZGGESX. π
ZGGES factors A and B as Q*S*Z' and Q*T*Z', where ' means conjugate transpose, S and T are upper triangular (i.e., in generalized Schur form), and Q and Z are unitary. It also computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n. So:
w(j) = alpha(j)/beta(j)
is a root of the characteristic equation
det( A - w(j) B ) = 0
Optionally it also reorders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal block of the Schur forms; computes a reciprocal condition number for the average of the selected eigenvalues; and computes a reciprocal condition number for the right and left deflating subspaces corresponding to the selected eigenvalues. slay. π¦
When ZDRGSX is called with NSIZE > 0, five (5) types of built-in matrix pairs are used to test the routine ZGGESX.
When ZDRGSX is called with NSIZE = 0, it reads in test matrix data to test ZGGESX. The original literally says (need more details on what kind of read-in data are needed) β not me making that up, bestie π.
For each matrix pair, the following tests will be performed and compared with the threshold THRESH except for the tests (7) and (9):
- Test (1):
| A - Q S Z' | / ( |A| n ulp )
- Test (2):
| B - Q T Z' | / ( |B| n ulp )
- Test (3):
| I - QQ' | / ( n ulp )
- Test (4):
| I - ZZ' | / ( n ulp )
- Test (5): if
Ais in Schur form (i.e. triangular form). - Test (6): maximum over
jofD(j)where:
|alpha(j) - S(j,j)| |beta(j) - T(j,j)|
D(j) = ------------------------ + -----------------------
max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
- Test (7): if sorting worked and
SDIMis the number of eigenvalues which were selected. - Test (8): the estimated value
DIFdoes not differ from the true values ofDifuandDiflmore than a factor10*THRESH. If the estimateDIFequals zero the corresponding true values ofDifuandDiflshould be less thanEPS*norm(A, B). If the true value ofDifuandDiflequal zero, the estimateDIFshould be less thanEPS*norm(A, B). - Test (9): If
INFO = N+3is returned byZGGESX, the reordering and we check thatDIF = PL = PR = 0and that the true value ofDifuandDiflis< EPS*norm(A, B). We count the events whenINFO=N+3.
For read-in test matrices, the same tests are run except that the exact value for DIF (and PL) is input data. Additionally, there is one more test run for read-in test matrices:
- Test (10): the estimated value
PLdoes not differ from the true value ofPLTRUmore than a factorTHRESH. If the estimatePLequals zero the corresponding true value ofPLTRUshould be less thanEPS*norm(A, B). If the true value ofPLTRUequal zero, the estimatePLshould be less thanEPS*norm(A, B).
Note that for the built-in tests, a total of10*NSIZE*(NSIZE-1)matrix pairs are generated and tested.NSIZEshould be kept small. π«Ά
SVD (routine ZGESVD) is used for computing the true value of DIF_u and DIF_l when testing the built-in test problems.
π Built-in Test Matrices π
All built-in test matrices are the 2 by 2 block of triangular matrices
A = [ A11 A12 ] and B = [ B11 B12 ]
[ A22 ] [ B22 ]
where for different type of A11 and A22 are given as the following. A12 and B12 are chosen so that the generalized Sylvester equation
A11*R - L*A22 = -A12
B11*R - L*B22 = -B12
have prescribed solution R and L.
- Type 1:
A11 = J_m(1,-1)andA_22 = J_k(1-a,1).B11 = I_m, B22 = I_kwhereJ_k(a,b)is the k-by-k Jordan block withaon diagonal andbon superdiagonal. - Type 2:
A11 = (a_ij) = ( 2(.5-sin(i)) )andB11 = (b_ij) = ( 2(.5-sin(ij)) )fori=1,...,m, j=i,...,m;A22 = (a_ij) = ( 2(.5-sin(i+j)) )andB22 = (b_ij) = ( 2(.5-sin(ij)) )fori=m+1,...,k, j=i,...,k. - Type 3:
A11,A22andB11,B22are chosen as for Type 2, but each second diagonal block inA_11and each third diagonal block inA_22are made as 2 by 2 blocks. - Type 4:
A11 = ( 20(.5 - sin(ij)) )andB22 = ( 2(.5 - sin(i+j)) )fori=1,...,m, j=1,...,mandA22 = ( 20(.5 - sin(i+j)) )andB22 = ( 2(.5 - sin(ij)) )fori=m+1,...,k, j=m+1,...,k. - Type 5:
(A,B)and have potentially close or common eigenvalues and very large departure from block diagonalityA_11is chosen as them x mleading submatrix ofA_1:
| 1 b |
| -b 1 |
| 1+d b |
| -b 1+d |
A_1 = | d 1 |
| -1 d |
| -d 1 |
| -1 -d |
| 1 |
and A_22 is chosen as the k x k leading submatrix of A_2:
| -1 b |
| -b -1 |
| 1-d b |
| -b 1-d |
A_2 = | d 1+b |
| -1-b d |
| -d 1+b |
| -1+b -d |
| 1-d |
and matrix B are chosen as identity matrices (see DLATM5). π«Ά
π Parameters π
NSIZEβNSIZEisINTEGER. The maximum size of the matrices to use.NSIZE >= 0. IfNSIZE = 0, no built-in tests matrices are used, but read-in test matrices are used to testDGGESX. iykyk β¨NCMAXβNCMAXisINTEGER. Maximum allowableNMAXfor generating Kroneker matrix in call toZLAKF2. not me spelling itKronekerβ that's literally what the page says, bestie. πTHRESHβTHRESHisDOUBLE PRECISION. A test will count as ... if the ..., computed as described above, exceedsTHRESH. Note that the error is scaled to beO(1), soTHRESHshould be a reasonably small multiple of1, e.g.,10or100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix.THRESH >= 0.NINβNINisINTEGER. The FORTRAN unit number for reading in the data file of problems to solve. πNOUTβNOUTisINTEGER. The FORTRAN unit number for printing out error messages (e.g., if a routine returnsINFOnot equal to0). π¨AβAisCOMPLEX*16array, dimension(LDA, NSIZE). Used to store the matrix whose eigenvalues are to be computed. On exit,Acontains the last matrix actually used. πLDAβLDAisINTEGER. The leading dimension ofA,B,AI,BI,ZandQ,LDA >= max( 1, NSIZE ). For the read-in test,LDA >= max( 1, N ),Nis the size of the test matrices.BβBisCOMPLEX*16array, dimension(LDA, NSIZE). Used to store the matrix whose eigenvalues are to be computed. On exit,Bcontains the last matrix actually used. π¦AIβAIisCOMPLEX*16array, dimension(LDA, NSIZE). Copy ofA, modified byZGGESX.BIβBIisCOMPLEX*16array, dimension(LDA, NSIZE). Copy ofB, modified byZGGESX.ZβZisCOMPLEX*16array, dimension(LDA, NSIZE).Zholds the left Schur vectors computed byZGGESX.QβQisCOMPLEX*16array, dimension(LDA, NSIZE).Qholds the right Schur vectors computed byZGGESX.ALPHAβALPHAisCOMPLEX*16array, dimension(NSIZE).BETAβBETAisCOMPLEX*16array, dimension(NSIZE). On exit,ALPHA/BETAare the eigenvalues. πC
Okay so picking up right inside the parameter lineup β no skipping, bestie, weβre doing all of them π
CβCOMPLEX*16 array, dimension (LDC). Store the matrix generated by subroutineZLAKF2; this is the matrix formed by Kronecker products used for estimatingDIF. Obsessed with a matrix that has lore π«ΆLDCβINTEGER. The leading dimension ofC.LDC >= max(1, LDA*LDA/2 ).Respect the math, babes β¨SβDOUBLE PRECISION array, dimension (LDC). Singular values ofC. Iconic values only πWORKβCOMPLEX*16 array, dimension (LWORK).LWORKβINTEGER. The dimension of the arrayWORK.LWORK >= 3*NSIZE*NSIZE/2RWORKβDOUBLE PRECISION array, dimension (5*NSIZE*NSIZE/2 - 4).IWORKβINTEGER array, dimension (LIWORK).LIWORKβINTEGER. The dimension of the arrayIWORK.LIWORK >= NSIZE + 2.BWORKβLOGICAL array, dimension (NSIZE).INFOβINTEGER:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value. π> 0: A routine returned an error code. π
Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 346 of file zdrgsx.f.
Author π€
Generated automatically by Doxygen for LAPACK from the source code.
Thatβs the whole vibe for TESTING/EIG/zdrgsx.f(3), and the footer is serving LAPACK Version 3.12.0 β bye bestie, go slay your linear algebra ππβ¨
π¦ 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