CDRGSX(3)
π¦ NAME π¦
ok so bestie, this page is all about /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/cdrgsx.f β and it's filed under the Library Functions Manual, so that's the manual name, noted, moving on π
β¨ SYNOPSIS β¨
π Functions/Subroutines π
subroutine CDRGSX (nsize, ncmax, thresh, nin, nout, a, lda, b, ai, bi,
z, q, alpha, beta, c, ldc, s, work, lwork, rwork, iwork, liwork,
bwork, info)
CDRGSX
π Function/Subroutine Documentation π
πΈ subroutine CDRGSX πΈ
subroutine CDRGSX (integer nsize, integer ncmax, real thresh, integer nin,
integer nout, complex, dimension( lda, * ) a, integer lda, complex,
dimension( lda, * ) b, complex, dimension( lda, * ) ai, complex,
dimension( lda, * ) bi, complex, dimension( lda, * ) z, complex,
dimension( lda, * ) q, complex, dimension( * ) alpha, complex,
dimension( * ) beta, complex, dimension( ldc, * ) c, integer ldc, real,
dimension( * ) s, complex, dimension( * ) work, integer lwork, real,
dimension( * ) rwork, integer, dimension( * ) iwork, integer liwork,
logical, dimension( * ) bwork, integer info)
CDRGSX
π₯ Purpose π₯
okay so picture this: CDRGSX is the vibe-check routine for the nonsymmetric generalized eigenvalue (Schur form) problem expert driver CGGESX. it's literally the tester. the main character checking on the other main character. π«Ά
CGGES 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. thus, 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. yes that's a lot of words, yes it's all doing something, slay π
when CDRGSX is called with NSIZE > 0, five (5) types of built-in matrix pairs are used to test the routine CGGESX.
when CDRGSX is called with NSIZE = 0, it reads in test matrix data to test CGGESX. (need more details on what kind of read-in data are needed). π
for each matrix pair, the following tests will be performed and compared with the threshold THRESH except for the tests (7) and (9):
| A - Q S Z' | / ( |A| n ulp )| B - Q T Z' | / ( |B| n ulp )| I - QQ' | / ( n ulp )| I - ZZ' | / ( n ulp )- if
Ais in Schur form (i.e. triangular form) - maximum over j of
D(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)|)
- if sorting worked and
SDIMis the number of eigenvalues which were selected. - 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). - if
INFO = N+3is returned byCGGESX, 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:
- 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. like, genuinely. keep it small, bestie π
SVD (routine CGESVD) 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) and A_22 = J_k(1-a,1). B11 = I_m, B22 = I_k where J_k(a,b) is the k-by-k Jordan block with a'' on diagonal and b'' on superdiagonal.
Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each second diagonal block in A_11 and each third diagonal block in A_22 are made as 2 by 2 blocks.
Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) ) for i=1,...,m, j=1,...,m and A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) ) for i=m+1,...,k, j=m+1,...,k
Type 5: (A,B) and have potentially close or common eigenvalues and very large departure from block diagonality A_11 is chosen as the m x m leading submatrix of A_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 SLATM5). β
π Parameters π
NSIZE
NSIZE is INTEGER. the maximum size of the matrices to use. NSIZE >= 0. if NSIZE = 0, no built-in tests matrices are used, but read-in test matrices are used to test SGGESX.
NCMAX
NCMAX is INTEGER. maximum allowable NMAX for generating Kroneker matrix in call to CLAKF2.
THRESH
THRESH is REAL. a test will count as ? if the ?, computed 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. THRESH >= 0. (the original literally has blanks here, i'm not making that up π)
NIN
NIN is INTEGER. the FORTRAN unit number for reading in the data file of problems to solve.
NOUT
NOUT is INTEGER. the FORTRAN unit number for printing out error messages (e.g., if a routine returns INFO not equal to 0.)
A
A is COMPLEX array, dimension (LDA, NSIZE). used to store the matrix whose eigenvalues are to be computed. on exit, A contains the last matrix actually used. π
LDA
LDA is INTEGER. the leading dimension of A, B, AI, BI, Z and Q, LDA >= max( 1, NSIZE ). for the read-in test, LDA >= max( 1, N ), N is the size of the test matrices.
B
B is COMPLEX array, dimension (LDA, NSIZE). used to store the matrix whose eigenvalues are to be computed. on exit, B contains the last matrix actually used.
AI
AI is COMPLEX array, dimension (LDA, NSIZE). copy of A, modified by CGGESX.
BI
BI is COMPLEX array, dimension (LDA, NSIZE). copy of B, modified by CGGESX.
Z
Z is COMPLEX array, dimension (LDA, NSIZE). Z holds the left Schur vectors computed by CGGESX.
Q
Q is COMPLEX array, dimension (LDA, NSIZE). Q holds the right Schur vectors computed by CGGESX.
ALPHA
ALPHA is COMPLEX array, dimension (NSIZE).
BETA
BETA is COMPLEX array, dimension (NSIZE).
on exit, ALPHA/BETA are the eigenvalues. π¦
C
CβCOMPLEXarray, dimension(LDC, LDC). It stores the matrix generated by subroutineCLAKF2; this is the matrix formed by Kronecker products used for estimatingDIF. πLDCβINTEGER. The leading dimension ofC. Condition:LDC >= max(1, LDA*LDA/2 ). πSβREALarray, dimension(LDC). Singular values ofC. β¨WORKβCOMPLEXarray, dimension(LWORK). π«ΆLWORKβINTEGER. The dimension of the arrayWORK. Condition:LWORK >= 3*NSIZE*NSIZE/2. πΈRWORKβREALarray, dimension(5*NSIZE*NSIZE/2 - 4). π¦IWORKβINTEGERarray, dimension(LIWORK). πLIWORKβINTEGER. The dimension of the arrayIWORK. Condition:LIWORK >= NSIZE + 2. πBWORKβLOGICALarray, dimension(NSIZE). βINFOβINTEGER. Status report, bestie:= 0: successful exit π< 0: ifINFO = -i, the i-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 cdrgsx.f. π
Author β¨
Generated automatically by Doxygen for LAPACK from the source code. π«Ά
Thatβs the whole page, bestie β LAPACK Version 3.12.0, source file /home/abui...IG/cdrgsx.f(3), and itβs generated by Doxygen for LAPACK from the source code. Periodt. ππ
π¦ 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