SRC/dgees.f(3)
π
SRC/dgees.f(3) β Library Functions Manual, but make it a vibe β¨
okay so bestie, this is the SRC/dgees.f(3) page from the Library Functions Manual. It's giving major linear-algebra main character energy, and we're gonna go through every single detail together. No cap.
π NAME
SRC/dgees.f
πΈ SYNOPSIS
π Functions/Subroutines
subroutine dgees (jobvs, sort, select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info)β DGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices
π¦ Function/Subroutine Documentation
π The actual subroutine
subroutine dgees (character jobvs, character sort, external select, integer
n, double precision, dimension( lda, * ) a, integer lda, integer sdim,
double precision, dimension( * ) wr, double precision, dimension( * )
wi, double precision, dimension( ldvs, * ) vs, integer ldvs, double
precision, dimension( * ) work, integer lwork, logical, dimension( * )
bwork, integer info)
DGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices
π Purpose
DGEES computes, for an N-by-N real nonsymmetric matrix A, the eigenvalues, the real Schur form T, and, optionally, the matrix of Schur vectors Z. This gives you the Schur factorization A = Z*T*(Z**T). Slay.
Optionally, it also orders the eigenvalues on the diagonal of the real Schur form so that selected eigenvalues are at the top left. The leading columns of Z then form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues. Love that for us.
A matrix is in real Schur form if it is upper quasi-triangular with 1-by-1 and 2-by-2 blocks. The 2-by-2 blocks will be standardized in the form
[ a b ]
[ c a ]
where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
π₯ Parameters
JOBVSβJOBVS is CHARACTER*1= 'N': Schur vectors are not computed;= 'V': Schur vectors are computed.
SORTβSORT is CHARACTER*1- Specifies whether or not to order the eigenvalues on the diagonal of the Schur form.
= 'N': Eigenvalues are not ordered;= 'S': Eigenvalues are ordered (see SELECT).
SELECTβSELECT is a LOGICAL FUNCTION of two DOUBLE PRECISION argumentsSELECTmust be declaredEXTERNALin the calling subroutine.- If
SORT = 'S',SELECTis used to select eigenvalues to sort to the top left of the Schur form. - If
SORT = 'N',SELECTis not referenced. - An eigenvalue
WR(j)+sqrt(-1)*WI(j)is selected ifSELECT(WR(j),WI(j))is true; i.e., if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. - Note that a selected complex eigenvalue may no longer satisfy
SELECT(WR(j),WI(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+2(seeINFObelow).
NβN is INTEGER- The order of the matrix
A.N >= 0.
- The order of the matrix
AβA is DOUBLE PRECISION array, dimension (LDA,N)- On entry, the
N-by-NmatrixA. - On exit,
Ahas been overwritten by its real Schur formT.
- On entry, the
LDAβLDA is INTEGER- The leading dimension of the array
A.LDA >= max(1,N).
- The leading dimension of the array
SDIMβSDIM is INTEGER- If
SORT = 'N',SDIM = 0. - If
SORT = 'S',SDIM= number of eigenvalues (after sorting) for whichSELECTis true. (Complex conjugate pairs for whichSELECTis true for either eigenvalue count as 2.)
- If
WRβWR is DOUBLE PRECISION array, dimension (N)WIβWI is DOUBLE PRECISION array, dimension (N)WRandWIcontain the real and imaginary parts, respectively, of the computed eigenvalues in the same order that they appear on the diagonal of the output Schur formT. Complex conjugate pairs of eigenvalues will appear consecutively with the eigenvalue having the positive imaginary part first.
VSβVS is DOUBLE PRECISION array, dimension (LDVS,N)- If
JOBVS = 'V',VScontains the orthogonal matrixZof Schur vectors. - If
JOBVS = 'N',VSis not referenced.
- If
LDVSβLDVS is INTEGER- The leading dimension of the array
VS.LDVS >= 1; ifJOBVS = 'V',LDVS >= N.
- The leading dimension of the array
WORKβWORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))- On exit, if
INFO = 0,WORK(1)contains the optimalLWORK.
- On exit, if
LWORKβLWORK is INTEGER- The dimension of the array
WORK.LWORK >= max(1,3*N). - For good performance,
LWORKmust generally be larger. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis 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, thei-th argument had an illegal value.> 0: ifINFO = i, andiis<= N: the QR algorithm failed to compute all the eigenvalues; elements1:ILO-1andi+1:NofWRandWIcontain those eigenvalues which have converged; ifJOBVS = 'V',VScontains the matrix which reducesAto its partially converged Schur form.= N+1: the eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned);= N+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfySELECT=.TRUE.. This could also be caused by underflow due to scaling.
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 214 of file dgees.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
okay that's the whole page, bestie π«Ά. Cute sign-off: this is from LAPACK, Version 3.12.0, page SRC/dgees.f(3). The footer doesn't show a date, so I'm not gonna invent one β 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