SRC/zggesx.f(3)
π¦ SRC/zggesx.f β the generalized Schur queen π
okay bestie, buckle up, because this one is a big one from Library Functions Manual and it's literally the moment zggesx becomes the main character β¨
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines
subroutine zggesx (jobvsl, jobvsr, sort, selctg, sense, n, a, lda, b,
ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv,
work, lwork, rwork, iwork, liwork, bwork, info)
ZGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices π
π Function/Subroutine Documentation π
subroutine zggesx (character jobvsl, character jobvsr, character sort,
external selctg, character sense, integer n, complex*16, dimension( lda,
* ) a, integer lda, complex*16, dimension( ldb, * ) b, integer ldb,
integer sdim, complex*16, dimension( * ) alpha, complex*16, dimension( *
) beta, complex*16, dimension( ldvsl, * ) vsl, integer ldvsl,
complex*16, dimension( ldvsr, * ) vsr, integer ldvsr, double precision,
dimension( 2 ) rconde, double precision, dimension( 2 ) rcondv,
complex*16, dimension( * ) work, integer lwork, double precision,
dimension( * ) rwork, integer, dimension( * ) iwork, integer liwork,
logical, dimension( * ) bwork, integer info)
ZGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices. no cap, that's the whole gig π«Ά
π Purpose:
ZGGESX computes for a pair of N-by-N complex nonsymmetric matrices (A,B), the generalized eigenvalues, the complex Schur form (S,T), and, optionally, the left and/or right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization (A,B) = ( (VSL) S (VSR)**H, (VSL) T (VSR)**H ) where (VSR)*H is the conjugate-transpose of VSR. conjugate-transpose is *literally that girl π
Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper triangular matrix S and the upper triangular matrix T; computes a reciprocal condition number for the average of the selected eigenvalues (RCONDE); and computes a reciprocal condition number for the right and left deflating subspaces corresponding to the selected eigenvalues (RCONDV). The leading columns of VSL and VSR then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces). π¦ A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or a ratio alpha/beta = w, such that A - w*B is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0 or for both being zero. A pair of matrices (S,T) is in generalized complex Schur form if T is upper triangular with non-negative diagonal and S is upper triangular. periodt. π
πΈ Parameters πΈ
π JOBVSL
JOBVSL isCHARACTER*1-'N': do not compute the left Schur vectors; -'V': compute the left Schur vectors.
π JOBVSR
JOBVSR isCHARACTER*1-'N': do not compute the right Schur vectors; -'V': compute the right Schur vectors.
π SORT
SORT isCHARACTER*1Specifies whether or not to order the eigenvalues on the diagonal of the generalized Schur form. -'N': Eigenvalues are not ordered; -'S': Eigenvalues are ordered (see SELCTG).
π SELCTG
SELCTG is aLOGICAL FUNCTIONof twoCOMPLEX*16arguments. SELCTG must be declaredEXTERNALin the calling subroutine. IfSORT = 'N', SELCTG is not referenced. IfSORT = 'S', SELCTG is used to select eigenvalues to sort to the top left of the Schur form. β οΈ heads up bestie: a selected complex eigenvalue may no longer satisfySELCTG(ALPHA(j),BETA(j)) = .TRUE.after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned). in this caseINFOis set toN+3β see INFO below. iykyk π
π SENSE
SENSE isCHARACTER*1Determines which reciprocal condition numbers are computed. -'N': None are computed; -'E': Computed for average of selected eigenvalues only; -'V': Computed for selected deflating subspaces only; -'B': Computed for both. IfSENSE = 'E','V', or'B', SORT must equal'S'. π«Ά
π N
N isINTEGERThe order of the matrices A, B, VSL, and VSR.N >= 0.
π A
A isCOMPLEX*16array, dimension(LDA, N)On entry, the first of the pair of matrices. On exit, A has been overwritten by its generalized Schur form S. she got a glow-up β¨
π LDA
LDA isINTEGERThe leading dimension of A.LDA >= max(1,N).
π B
B isCOMPLEX*16array, dimension(LDB, N)On entry, the second of the pair of matrices. On exit, B has been overwritten by its generalized Schur form T.
π LDB
LDB isINTEGERThe leading dimension of B.LDB >= max(1,N).
π SDIM
SDIM isINTEGER- IfSORT = 'N',SDIM = 0. - IfSORT = 'S',SDIM =number of eigenvalues (after sorting) for which SELCTG is true.
π ALPHA
ALPHA isCOMPLEX*16array, dimension(N)
π BETA
BETA isCOMPLEX*16array, dimension(N)On exit,ALPHA(j)/BETA(j),j=1,...,N, will be the generalized eigenvalues.ALPHA(j)andBETA(j),j=1,...,Nare the diagonals of the complex Schur form (S,T).BETA(j)will be non-negative real. β οΈ Note: the quotientsALPHA(j)/BETA(j)may easily over- or underflow, andBETA(j)may even be zero. Thus, the user should avoid naively computing the ratio alpha/beta. However, ALPHA will be always less than and usually comparable withnorm(A)in magnitude, and BETA always less than and usually comparable withnorm(B). girl math will NOT save you here π
π VSL
VSL isCOMPLEX*16array, dimension(LDVSL,N)IfJOBVSL = 'V', VSL will contain the left Schur vectors. Not referenced ifJOBVSL = 'N'.
π LDVSL
LDVSL isINTEGERThe leading dimension of the matrix VSL.LDVSL >=1, and ifJOBVSL = 'V',LDVSL >= N.
π VSR
VSR isCOMPLEX*16array, dimension(LDVSR,N)IfJOBVSR = 'V', VSR will contain the right Schur vectors. Not referenced ifJOBVSR = 'N'.
π LDVSR
LDVSR isINTEGERThe leading dimension of the matrix VSR.LDVSR >= 1, and ifJOBVSR = 'V',LDVSR >= N.
π RCONDE
RCONDE isDOUBLE PRECISIONarray, dimension( 2 )IfSENSE = 'E'or'B',RCONDE(1)andRCONDE(2)contain the reciprocal condition numbers for the average of the selected eigenvalues. Not referenced ifSENSE = 'N'or'V'.
π RCONDV
RCONDV isDOUBLE PRECISIONarray, dimension( 2 )IfSENSE = 'V'or'B',RCONDV(1)andRCONDV(2)contain the reciprocal condition number for the selected deflating subspaces. Not referenced ifSENSE = 'N'or'E'.
π WORK
WORK isCOMPLEX*16array, dimension(MAX(1,LWORK))On exit, ifINFO = 0,WORK(1)returns the optimal LWORK. π
π LWORK
LWORK isINTEGERThe dimension of the array WORK. IfN = 0,LWORK >= 1, else ifSENSE = 'E','V', or'B',LWORK >= MAX(1,2*N,2*SDIM*(N-SDIM)), elseLWORK >= MAX(1,2*N). Note that2*SDIM*(N-SDIM) <= N*N/2. > careful bestie π¨ an error is only returned ifLWORK < MAX(1,2*N), but ifSENSE = 'E'or'V'or'B'this may not be large enough. IfLWORK = -1, then a workspace query is assumed; the routine only calculates the bound on the optimal size of the WORK array and the minimum size of the IWORK array, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued byXERBLA.
π RWORK
RWORK isDOUBLE PRECISIONarray, dimension( 8*N )Real workspace.
π IWORK
IWORK isINTEGERarray, dimension(MAX(1,LIWORK))On exit, ifINFO = 0,IWORK(1)returns the minimum LIWORK.
π LIWORK
LIWORK isINTEGERThe dimension of the array IWORK. IfSENSE = 'N'orN = 0,LIWORK >= 1, otherwiseLIWORK >= N+2. IfLIWORK = -1, then a workspace query is assumed; the routine only calculates the bound on the optimal size of the WORK array and the minimum size of the IWORK array, returns these values as the first entries of the WORK and IWORK arrays, and no error message related to LWORK or LIWORK is issued byXERBLA.
π BWORK
BWORK isLOGICALarray, dimension(N)Not referenced ifSORT = 'N'.
π INFO
(...and bestie, INFO's whole moment is coming up next β stay tuned π)
Okay so INFO is an INTEGER, and it's literally the group-chat receipts for what happened π§Ύβ¨:
= 0β successful exit. periodt π< 0β ifINFO = -i, the i-th argument had an illegal value. not cute, but okay π= 1,...,Nβ The QZ iteration failed.(A,B)are not in Schur form, butALPHA(j)andBETA(j)should be correct forj=INFO+1,...,N. so you still got some correct eigenvalues in there, bestie π«Ά> Nβ okay so this is the extra-specific lore:=N+1β other than QZ iteration failed inZHGEQZ=N+2β after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Generalized Schur form no longer satisfySELCTG=.TRUE.. This could also be caused due to scaling.=N+3β reordering failed inZTGSEN.
Author π
The icons behind it, fr fr:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 326 of file zggesx.f. π
Author π
Generated automatically by Doxygen for LAPACK from the source code. no cap, it just spawned itself like that π«Ά
Thatβs the whole scroll from SRC/zggesx.f(3), LAPACK Version 3.12.0 β mwah, bestie ππ
π¦ 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