SRC/cggesx.f(3)
Manual: Library Functions Manual Β· page: SRC/cggesx.f(3) π«Ά
β¨ NAME β¨
SRC/cggesx.f β thatβs it, thatβs the name, bestie π
no cap.
π¦ SYNOPSIS π¦
π Functions/Subroutines π
Okay so hereβs the subroutine icon itself, signature and all β copy it exactly, donβt freelance the args, fr fr:
subroutine cggesx (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)
And what does CGGESX do? CGGESX computes the eigenvalues, the Schur form, and β optionally β the matrix of Schur vectors for GE matrices β¨ Thatβs the whole serve, periodt π
π» FUNCTION/SUBROUTINE DOCUMENTATION π»
subroutine cggesx (character jobvsl, character jobvsr, character sort,
external selctg, character sense, integer n, complex, dimension( lda, *
) a, integer lda, complex, dimension( ldb, * ) b, integer ldb, integer
sdim, complex, dimension( * ) alpha, complex, dimension( * ) beta,
complex, dimension( ldvsl, * ) vsl, integer ldvsl, complex, dimension(
ldvsr, * ) vsr, integer ldvsr, real, dimension( 2 ) rconde, real,
dimension( 2 ) rcondv, complex, dimension( * ) work, integer lwork,
real, dimension( * ) rwork, integer, dimension( * ) iwork, integer
liwork, logical, dimension( * ) bwork, integer info)
CGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices.
π― Purpose π―
Okay bestie, so CGGESX 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.
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.
ποΈ Parameters ποΈ
JOBVSLβJOBVSL is CHARACTER*1= 'N':do not compute the left Schur vectors;= 'V':compute the left Schur vectors.
JOBVSRβJOBVSR is CHARACTER*1= 'N':do not compute the right Schur vectors;= 'V':compute the right Schur vectors.
SORTβSORT is CHARACTER*1- Specifies whether or not to order the eigenvalues on the diagonal of the generalized Schur form.
= 'N':Eigenvalues are not ordered;= 'S':Eigenvalues are ordered (seeSELCTG).
SELCTGβSELCTG is a LOGICAL FUNCTION of two COMPLEX argumentsSELCTGmust be declaredEXTERNALin the calling subroutine.- If
SORT = 'N',SELCTGis not referenced. - If
SORT = 'S',SELCTGis used to select eigenvalues to sort to the top left of the Schur form. - Note that a selected complex eigenvalue may no longer satisfy
SELCTG(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+3seeINFObelow.
SENSEβSENSE is CHARACTER*1- Determines 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.- If
SENSE = 'E','V', or'B',SORTmust equal'S'.
NβN is INTEGER- The order of the matrices
A,B,VSL, andVSR.N >= 0.
- The order of the matrices
AβA is COMPLEX array, dimension (LDA, N)- On entry, the first of the pair of matrices.
- On exit,
Ahas been overwritten by its generalized Schur formS.
LDAβLDA is INTEGER- The leading dimension of
A.LDA >= max(1,N).
- The leading dimension of
BβB is COMPLEX array, dimension (LDB, N)- On entry, the second of the pair of matrices.
- On exit,
Bhas been overwritten by its generalized Schur formT.
LDBβLDB is INTEGER- The leading dimension of
B.LDB >= max(1,N).
- The leading dimension of
SDIMβSDIM is INTEGER- If
SORT = 'N',SDIM = 0. - If
SORT = 'S',SDIM = number of eigenvalues (after sorting) for which SELCTG is true.
- If
ALPHAβALPHA is COMPLEX array, dimension (N)BETAβBETA is COMPLEX array, 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 quotients
ALPHA(j)/BETA(j)may easily over- or underflow, andBETA(j)may even be zero. Thus, the user should avoid naively computing the ratioalpha/beta. However,ALPHAwill be always less than and usually comparable withnorm(A)in magnitude, andBETAalways less than and usually comparable withnorm(B).
- On exit,
VSLβVSL is COMPLEX array, dimension (LDVSL,N)- If
JOBVSL = 'V',VSLwill contain the left Schur vectors. - Not referenced if
JOBVSL = 'N'.
- If
LDVSLβLDVSL is INTEGER- The leading dimension of the matrix
VSL.LDVSL >=1, and ifJOBVSL = 'V',LDVSL >= N.
- The leading dimension of the matrix
VSRβVSR is COMPLEX array, dimension (LDVSR,N)- If
JOBVSR = 'V',VSRwill contain the right Schur vectors. - Not referenced if
JOBVSR = 'N'.
- If
LDVSRβLDVSR is INTEGER- The leading dimension of the matrix
VSR.LDVSR >= 1, and ifJOBVSR = 'V',LDVSR >= N.
- The leading dimension of the matrix
RCONDEβRCONDE is REAL array, dimension ( 2 )- If
SENSE = 'E'or'B',RCONDE(1)andRCONDE(2)contain the reciprocal condition numbers for the average of the selected eigenvalues. - Not referenced if
SENSE = 'N'or'V'.
- If
RCONDVβRCONDV is REAL array, dimension ( 2 )- If
SENSE = 'V'or'B',RCONDV(1)andRCONDV(2)contain the reciprocal condition number for the selected deflating subspaces. - Not referenced if
SENSE = 'N'or'E'.
- If
WORKβWORK is COMPLEX array, dimension (MAX(1,LWORK))- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK.
- On exit, if
LWORKβLWORK is INTEGER- The dimension of the array
WORK. - If
N = 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. Note also that an error is only returned ifLWORK < MAX(1,2*N), but ifSENSE = 'E'or'V'or'B'this may not be large enough. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the bound on the optimal size of theWORKarray and the minimum size of theIWORKarray, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
- The dimension of the array
RWORKβRWORK is REAL array, dimension ( 8*N )- Real workspace.
IWORKβIWORK is INTEGER array, dimension (MAX(1,LIWORK))- On exit, if
INFO = 0,IWORK(1)returns the minimumLIWORK.
- On exit, if
LIWORKβLIWORK is INTEGER- The dimension of the array
WORK. - If
SENSE = 'N'orN = 0,LIWORK >= 1, otherwiseLIWORK >= N+2. - If
LIWORK = -1, then a workspace query is assumed; the routine only calculates the bound on the optimal size of theWORKarray and the minimum size of theIWORKarray, returns these values as the first entries of theWORKandIWORKarrays, and no error message related toLWORKorLIWORKis issued byXERBLA.
- The dimension of the array
BWORKβBWORK is LOGICAL array, dimension (N)- Not referenced if
SORT = 'N'.
- Not referenced if
INFOβINFO is INTEGER= 0:successful exit< 0:ifINFO = -i, the i-th argument had an illegal value.= 1,...,N:The QZ iteration failed.(A,B)are not in Schur form, butALPHA(j)andBETA(j)should be correct forj=INFO+1,...,N.> N:=N+1:other than QZ iteration failed inCHGEQZ=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 inCTGSEN.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 326 of file cggesx.f.
β¨ Author β¨
This page was auto-generated by Doxygen for LAPACK, straight from the source code β so the βauthorβ here is literally the doc generator doing its main character thing π β¨.
Thatβs the whole page, bestie π«Ά This lilβ glow-up is serving LAPACK Version 3.12.0 energy from SRC/cggesx.f(3), and the footer vibes were auto-generated by Doxygen for LAPACK from the source code. Periodt π
π¦ 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