SDRGSX(3)
SDRGSX(3) β Library Functions Manual. okay so bestie, buckle up, because this one is a whole vibe: it's a test driver for the nonsymmetric generalized eigenvalue problem, and it has opinions about SGGESX. π
β¨
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/sdrgsx.f
β¨ SYNOPSIS β¨
π Functions/Subroutines π
subroutine SDRGSX (nsize, ncmax, thresh, nin, nout, a, lda, b, ai, bi,
z, q, alphar, alphai, beta, c, ldc, s, work, lwork, iwork, liwork,
bwork, info)
SDRGSX
π Function/Subroutine Documentation π
subroutine SDRGSX (integer nsize, integer ncmax, real thresh, integer nin,
integer nout, real, dimension( lda, * ) a, integer lda, real, dimension(
lda, * ) b, real, dimension( lda, * ) ai, real, dimension( lda, * ) bi,
real, dimension( lda, * ) z, real, dimension( lda, * ) q, real,
dimension( * ) alphar, real, dimension( * ) alphai, real, dimension( * )
beta, real, dimension( ldc, * ) c, integer ldc, real, dimension( * ) s,
real, dimension( * ) work, integer lwork, integer, dimension( * ) iwork,
integer liwork, logical, dimension( * ) bwork, integer info)
SDRGSX
π Purpose π
okay so bestie, SDRGSX is out here checking the nonsymmetric generalized eigenvalue Schur form problem expert driver SGGESX. no cap, that's the whole assignment. π
SGGESX factors A and B as Q S Z' and Q T Z', where ' means transpose, T is upper triangular, S is in generalized Schur form (block upper triangular, with 1x1 and 2x2 blocks on the diagonal, the 2x2 blocks corresponding to complex conjugate pairs of generalized eigenvalues), and Q and Z are orthogonal. it also computes the generalized eigenvalues (alpha(1),beta(1)), ..., (alpha(n),beta(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. iconic behavior, honestly. β¨
when SDRGSX is called with NSIZE > 0, five (5) types of built-in matrix pairs are used to test the routine SGGESX. π«Ά
when SDRGSX is called with NSIZE = 0, it reads in test matrix data to test SGGESX. π
for each matrix pair, the following tests will be performed and compared with the threshold THRESH except for the tests (7) and (9):
(1) | A - Q S Z' | / ( |A| n ulp )(2) | B - Q T Z' | / ( |B| n ulp )(3) | I - QQ' | / ( n ulp )(4) | I - ZZ' | / ( n ulp )(5)β ifAis in Schur form (i.e. quasi-triangular form). lowkey a vibe check for triangularity. π₯(6)β maximum overjofD(j), where:
if alpha(j) is real:
|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 alpha(j) is complex:
| det( s S - w T ) |
D(j) = ---------------------------------------------------
ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
and S and T are here the 2 x 2 diagonal blocks of S and T
corresponding to the j-th and j+1-th eigenvalues.
(7)β if sorting worked andSDIMis the number of eigenvalues which were selected. sorting ate, fr fr. π(8)β the estimated valueDIFdoes 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). π(9)β ifINFO = N+3is returned bySGGESX, 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 above 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:
(10)β the estimated valuePLdoes 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). bestie, that's a lot of condition numbers, but we stay focused. π
note that for the built-in tests, a total of10*NSIZE*(NSIZE-1)matrix pairs are generated and tested.NSIZEshould be kept small. seriously, keep it small. this is not the moment for main character matrix sizes. π
SVD (routine SGESVD) 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. slay, prescribed solutions. π
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β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 testSGGESX. β¨NCMAXβNCMAXisINTEGER. maximum allowableNMAXfor generating Kroneker matrix in call toSLAKF2. (yes, the original says βKronekerβ β we respect the spelling, bestie.)THRESHβTHRESHisREAL. 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. theFORTRANunit number for reading in the data file of problems to solve. πNOUTβNOUTisINTEGER. theFORTRANunit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0.) π¨AβAisREALarray, 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βBisREALarray, dimension(LDA, NSIZE). used to store the matrix whose eigenvalues are to be computed. on exit,Bcontains the last matrix actually used. πAIβAIisREALarray, dimension(LDA, NSIZE). copy ofA, modified bySGGESX. π¦BIβBIisREALarray, dimension(LDA, NSIZE). copy ofB, modified bySGGESX. π¦ZβZisREALarray, dimension(LDA, NSIZE).Zholds the left Schur vectors computed bySGGESX. πQβ β¦QβQ is REAL array, dimension (LDA, NSIZE), and itβs holding the right Schur vectors computed bySGGESX. Thatβs the whole vibe, bestie πALPHARβALPHAR is REAL array, dimension (NSIZE). Short, sweet, real-array realness β¨ALPHAIβALPHAI is REAL array, dimension (NSIZE). Same energy, iconic πBETAβBETA is REAL array, dimension (NSIZE). On exit,(ALPHAR + ALPHAI*i)/BETAare the eigenvalues. Math slay π₯CβC is REAL array, dimension (LDC, LDC). It stores the matrix generated by subroutineSLAKF2β thatβs the matrix formed by Kronecker products used for estimatingDIF. We love a KronECKER moment π¦LDCβLDC is INTEGER, the leading dimension ofC. And the bound isLDC >= max(1, LDA*LDA/2 ).Respect it, periodt πSβS is REAL array, dimension (LDC), holding the singular values ofC. Singular-value slay πΈWORKβWORK is REAL array, dimension (LWORK). The workspace bestie, no notes π«ΆLWORKβLWORK is INTEGER, the dimension of the arrayWORK. It has to satisfyLWORK >= MAX( 5*NSIZE*NSIZE/2 - 2, 10*(NSIZE+1) ). Math check, no cap π§IWORKβIWORK is INTEGER array, dimension (LIWORK). Integer workspace, doing its lil job πLIWORKβLIWORK is INTEGER, the dimension of the arrayIWORK. The rule isLIWORK >= NSIZE + 6.Locked in πBWORKβBWORK is LOGICAL array, dimension (LDA). Logical array, logical queen πINFOβINFO is INTEGER, and hereβs the status tea:= 0: successful exit< 0: if INFO = -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 356 of file sdrgsx.f.
π€ Author π€
Generated automatically by Doxygen for LAPACK from the source code.
and thatβs the LAPACK Version 3.12.0 tea, straight from /home/abui...IG/sdrgsx.f(3) β bye bestie, go slay those Schur vectors πβ¨
π¦ 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