tgevc(3)
π tgevc(3) β Library Functions Manual π
okay so bestie, this whole page is from the Library Functions Manual (section 3) and it's giving "linear algebra main character energy" β¨ β we're talking eigenvectors of a pair of matrices here, no cap. Buckle up. π
πΈ NAME πΈ
tgevc β tgevc: eigvec of pair of matrices
π¦ SYNOPSIS π¦
Functions
subroutine ctgevc (side, howmny, select, n, s, lds, p, ldp, vl, ldvl,
vr, ldvr, mm, m, work, rwork, info)
CTGEVC
subroutine dtgevc (side, howmny, select, n, s, lds, p, ldp, vl, ldvl,
vr, ldvr, mm, m, work, info)
DTGEVC
subroutine stgevc (side, howmny, select, n, s, lds, p, ldp, vl, ldvl,
vr, ldvr, mm, m, work, info)
STGEVC
subroutine ztgevc (side, howmny, select, n, s, lds, p, ldp, vl, ldvl,
vr, ldvr, mm, m, work, rwork, info)
ZTGEVC
π₯ Detailed Description π₯
Lowkey there's no prose here in the source β it just goes straight into the function docs. Respect the hustle honestly.
π Function Documentation π
subroutine ctgevc
subroutine ctgevc (character side, character howmny, logical, dimension( * )
select, integer n, complex, dimension( lds, * ) s, integer lds, complex,
dimension( ldp, * ) p, integer ldp, complex, dimension( ldvl, * ) vl,
integer ldvl, complex, dimension( ldvr, * ) vr, integer ldvr, integer
mm, integer m, complex, dimension( * ) work, real, dimension( * ) rwork,
integer info)
β¨ CTGEVC β¨
π Purpose π
okay so here's the vibe: CTGEVC computes some or all of the right and/or left eigenvectors of a pair of complex matrices (S,P), where S and P are upper triangular. Matrix pairs of this type are produced by the generalized Schur factorization of a complex matrix pair (A,B):
A = Q*S*Z**H, B = Q*P*Z**H
as computed by CGGHRD + CHGEQZ. slay. π
So the right eigenvector x and the left eigenvector y of (S,P) corresponding to an eigenvalue w are defined by:
S*x = w*P*x, (y**H)*S = w*(y**H)*P,
where y**H denotes the conjugate transpose of y. The eigenvalues are not input to this routine β nope, they're computed directly from the diagonal elements of S and P. it does its own thing. β¨
This routine returns the matrices X and/or Y of right and left eigenvectors of (S,P), or the products Z*X and/or Q*Y, where Z and Q are input matrices. And if Q and Z are the unitary factors from the generalized Schur factorization of a matrix pair (A,B), then Z*X and Q*Y are the matrices of right and left eigenvectors of (A,B). literally the whole pipeline. π«Ά
π Parameters π
SIDEβSIDEisCHARACTER*1= 'R': compute right eigenvectors only;= 'L': compute left eigenvectors only;= 'B': compute both right and left eigenvectors.
HOWMNYβHOWMNYisCHARACTER*1= 'A': compute all right and/or left eigenvectors;= 'B': compute all right and/or left eigenvectors, backtransformed by the matrices inVRand/orVL;= 'S': compute selected right and/or left eigenvectors, specified by the logical arraySELECT.
SELECTβSELECTisLOGICALarray, dimension(N). IfHOWMNY='S',SELECTspecifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed ifSELECT(j) = .TRUE.. Not referenced ifHOWMNY = 'A'or'B'.NβNisINTEGER. The order of the matricesSandP.N >= 0.SβSisCOMPLEXarray, dimension(LDS,N). The upper triangular matrixSfrom a generalized Schur factorization, as computed byCHGEQZ.LDSβLDSisINTEGER. The leading dimension of arrayS.LDS >= max(1,N).PβPisCOMPLEXarray, dimension(LDP,N). The upper triangular matrixPfrom a generalized Schur factorization, as computed byCHGEQZ.Pmust have real diagonal elements. π yeah, that's a requirement, not a suggestion.LDPβLDPisINTEGER. The leading dimension of arrayP.LDP >= max(1,N).VLβVLisCOMPLEXarray, dimension(LDVL,MM). On entry, ifSIDE = 'L'or'B'andHOWMNY = 'B',VLmust contain anN-by-NmatrixQ(usually the unitary matrixQof left Schur vectors returned byCHGEQZ). On exit, ifSIDE = 'L'or'B',VLcontains:- if
HOWMNY = 'A', the matrixYof left eigenvectors of(S,P); - if
HOWMNY = 'B', the matrixQ*Y; - if
HOWMNY = 'S', the left eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVL, in the same order as their eigenvalues.
- if
Not referenced if SIDE = 'R'.
LDVLβLDVLisINTEGER. The leading dimension of arrayVL.LDVL >= 1, and ifSIDE = 'L'or'l'or'B'or'b',LDVL >= N. (yes bestie, they really do list both cases, keep up π)VRβVRisCOMPLEXarray, dimension(LDVR,MM). On entry, ifSIDE = 'R'or'B'andHOWMNY = 'B',VRmust contain anN-by-NmatrixZ(usually the unitary matrixZof right Schur vectors returned byCHGEQZ). On exit, ifSIDE = 'R'or'B',VRcontains:- if
HOWMNY = 'A', the matrixXof right eigenvectors of(S,P); - if
HOWMNY = 'B', the matrixZ*X; - if
HOWMNY = 'S', the right eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVR, in the same order as their eigenvalues.
- if
Not referenced if SIDE = 'L'.
LDVRβLDVRisINTEGER. The leading dimension of the arrayVR.LDVR >= 1, and ifSIDE = 'R'or'B',LDVR >= N.MMβMMisINTEGER. The number of columns in the arraysVLand/orVR.MM >= M.MβMisINTEGER. The number of columns in the arraysVLand/orVRactually used to store the eigenvectors. IfHOWMNY = 'A'or'B',Mis set toN. Each selected eigenvector occupies one column.WORKβWORKisCOMPLEXarray, dimension(2*N)RWORKβRWORKisREALarray, dimension(2*N)INFOβINFOisINTEGER= 0: successful exit. π< 0: ifINFO = -i, the i-th argument had an illegal value. π
π§ Author π§
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 217 of file ctgevc.f.
subroutine dtgevc
subroutine dtgevc (character side, character howmny, logical, dimension( * )
select, integer n, double precision, dimension( lds, * ) s, integer lds,
double precision, dimension( ldp, * ) p, integer ldp, double precision,
dimension( ldvl, * ) vl, integer ldvl, double precision, dimension(
ldvr, * ) vr, integer ldvr, integer mm, integer m, double precision,
dimension( * ) work, integer info)
β¨ DTGEVC β¨
π Purpose π
So DTGEVC computes some or all of the right and/or left eigenvectors of a pair of real matrices (S,P), where S is a quasi-triangular matrix and P is upper triangular. Matrix pairs of this type are produced by the generalized Schur factorization of a matrix pair (A,B):
A = Q*S*Z**T, B = Q*P*Z**T
as computed by DGGHRD + DHGEQZ. (note the **T this time, not **H β real ones do be like that π)
The right eigenvector x and the left eigenvector y of (S,P) corresponding to an eigenvalue w are defined by:
S*x = w*P*x, (y**H)*S = w*(y**H)*P,
where y**H denotes the conjugate transpose of y. The eigenvalues are not input to this routine, but are computed directly from the diagonal blocks of S and P. blocks, bestie, not just elements. π§±
This routine returns the matrices X and/or Y of right and left eigenvectors of (S,P), or the products Z*X and/or Q*Y, where Z and Q are input matrices. If Q and Z are the orthogonal factors from the generalized Schur factorization of a matrix pair (A,B), then Z*X and Q*Y are the matrices of right and left eigenvectors of (A,B). π«Ά
π Parameters π
SIDEβSIDEisCHARACTER*1= 'R': compute right eigenvectors only;= 'L': compute left eigenvectors only;= 'B': compute both right and left eigenvectors.
HOWMNYβHOWMNYisCHARACTER*1= 'A': compute all right and/or left eigenvectors;= 'B': compute all right and/or left eigenvectors, backtransformed by the matrices inVRand/orVL;= 'S': compute selected right and/or left eigenvectors, specified by the logical arraySELECT.
SELECTβSELECTisLOGICALarray, dimension(N). IfHOWMNY='S',SELECTspecifies the eigenvectors to be computed. Ifw(j)is a real eigenvalue, the corresponding real eigenvector is computed ifSELECT(j)is.TRUE.. Ifw(j)andw(j+1)are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if eitherSELECT(j)orSELECT(j+1)is.TRUE., and on exitSELECT(j)is set to.TRUE.andSELECT(j+1)is set to.FALSE.. Not referenced ifHOWMNY = 'A'or'B'. (yes it edits your array back at you, iconic behavior honestly π₯)NβNisINTEGER. The order of the matricesSandP.N >= 0.SβSisDOUBLE PRECISIONarray, dimension(LDS,N). The upper quasi-triangular matrixSfrom a generalized Schur factorization, as computed byDHGEQZ.LDSβLDSisINTEGER. The leading dimension of arrayS.LDS >= max(1,N).PβPisDOUBLE PRECISIONarray, dimension(LDP,N). The upper triangular matrixPfrom a generalized Schur factorization, as computed byDHGEQZ. 2-by-2 diagonal blocks ofPcorresponding to 2-by-2 blocks ofSmust be in positive diagonal form. β requirements stay requirements.LDPβ π okay bestie the source text cuts off right here atLDP, so that's where this part ends β more incoming.VLβ DOUBLE PRECISION array, dimension(LDVL,MM)</p>. On entry, ifSIDE = 'L'or'B'andHOWMNY = 'B',VLhas to already contain anN-by-NmatrixQ(usually the orthogonal matrixQof left Schur vectors thatDHGEQZhanded back to you π ). On exit, ifSIDE = 'L'or'B',VLcontains:- if
HOWMNY = 'A', the matrixYof left eigenvectors of(S,P); - if
HOWMNY = 'B', the matrixQ*Y; - if
HOWMNY = 'S', the left eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVL, in the same order as their eigenvalues.
- if
A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns β first column holds the real part, second holds the imaginary part π«Ά. Not referenced if SIDE = 'R'.
LDVLβ INTEGER</p>. The leading dimension of arrayVL.LDVL >= 1, and ifSIDE = 'L'or'B', thenLDVL >= N.VRβ DOUBLE PRECISION array, dimension(LDVR,MM). On entry, ifSIDE = 'R'or'B'andHOWMNY = 'B',VRmust contain anN-by-NmatrixZ(usually the orthogonal matrixZof right Schur vectors returned byDHGEQZ). On exit, ifSIDE = 'R'or'B',VRcontains:- if
HOWMNY = 'A', the matrixXof right eigenvectors of(S,P); - if
HOWMNY = 'B'or'b', the matrixZ*X; - if
HOWMNY = 'S'or's', the right eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVR, in the same order as their eigenvalues.
- if
A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns β real part first, imaginary part second π. Not referenced if SIDE = 'L'.
ok so tiny vibe check π΅οΈββοΈ β the source is literally inconsistent here:VLonly lists'B'and'S'(big letters only) whileVRlists'B'or'b'and'S'or's'. That's exactly what it says, so that's exactly what I'm telling you. Don't come for me, come for the Fortran π
LDVRβ INTEGER</p>. The leading dimension of the arrayVR.LDVR >= 1, and ifSIDE = 'R'or'B', thenLDVR >= N.MMβ INTEGER</p>. The number of columns in the arraysVLand/orVR. Gotta beMM >= M.Mβ INTEGER</p>. The number of columns inVLand/orVRthat are actually used to store the eigenvectors π₯. IfHOWMNY = 'A'or'B', thenMis set toN. Each selected real eigenvector occupies one column, and each selected complex eigenvector occupies two columns. (Yes bestie, that's the whole reasonMMexists. Math said "it depends" π)WORKβ DOUBLE PRECISION array, dimension(6*N). Scratch space, six whole blocks of it, all accounted for down below β¬οΈINFOβ INTEGER</p>, the status code, the moment of truth π:= 0: successful exit. slay β¨< 0: ifINFO = -i, thei-th argument had an illegal value π> 0: the 2-by-2 block(INFO:INFO+1)does not have a complex eigenvalue π
βοΈ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details
Allocation of workspace π§ (the original underlines this with ---------- -- ---------, which is very "I typed this in 1994" of it, but we move):
WORK( j ) = 1-norm of j-th column of A, above the diagonal
WORK( N+j ) = 1-norm of j-th column of B, above the diagonal
WORK( 2*N+1:3*N ) = real part of eigenvector
WORK( 3*N+1:4*N ) = imaginary part of eigenvector
WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector
WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector
Nice and tidy β six chunks of N, one job each π
Rowwise vs. columnwise solution methods π¦
Finding a generalized eigenvector basically means solving the singular triangular system
(A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left)
So say you're finding the i-th right eigenvector (assume every eigenvalue is real, keep it cute). The equation you're solving is:
n i
0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1
k=j k=j
where C = (A - w B) β and heads up, the components v(i+1:n) are 0.
The method goes like this:
(1) v(i) := 1
for j = i-1,. . .,1:
i
(2) compute s = - sum C(j,k) v(k) and
k=j+1
(3) v(j) := s / C(j,j)
Step 2 is sometimes called the step (no cap, there's a word missing in the source right there β some formatting gremlin ate it π β I'm not making one up for you), since it's an inner product between the j-th row and the portion of the eigenvector that's been computed so far.
The other method (also with a word missing in the original β same gremlin, same energy π« ) consists basically in doing the sums for all the rows in parallel. As each v(j) gets computed, the contribution of v(j) times the j-th column of C is added to the partial sums. And because FORTRAN arrays are stored columnwise, this is a whole glow-up: at each step, the elements of C you're touching are adjacent to each other π β whereas with the rowwise method, the elements accessed at a step are spaced LDS (and LDP) words apart. Painful. Not the vibe.
And here's the plot twist: when you're finding left eigenvectors, the matrix in question is the transpose of the one in storage π€― so the rowwise method is actually the one accessing columns of A and B at each step β which makes it the preferred method over there. It's giving "the answer depends on which side you're on", periodt.
Definition at line 293 of file dtgevc.f.
π stgevc β same energy, single precision
subroutine stgevc (character side, character howmny, logical, dimension( * )
select, integer n, real, dimension( lds, * ) s, integer lds, real,
dimension( ldp, * ) p, integer ldp, real, dimension( ldvl, * ) vl,
integer ldvl, real, dimension( ldvr, * ) vr, integer ldvr, integer mm,
integer m, real, dimension( * ) work, integer info)
π― Purpose
STGEVC computes some or all of the right and/or left eigenvectors of a pair of real matrices (S,P), where S is a quasi-triangular matrix and P is upper triangular πΊ. Matrix pairs of this type are produced by the generalized Schur factorization of a matrix pair (A,B):
A = Q*S*Z**T, B = Q*P*Z**T
as computed by SGGHRD + SHGEQZ.
The right eigenvector x and the left eigenvector y of (S,P) corresponding to an eigenvalue w are defined by:
S*x = w*P*x, (y**H)*S = w*(y**H)*P,
where y**H denotes the conjugate transpose of y. And here's the iconic part: the eigenvalues are not input to this routine β they're computed directly from the diagonal blocks of S and P π. It knows. It just knows.
This routine returns the matrices X and/or Y of right and left eigenvectors of (S,P), or the products Z*X and/or Q*Y, where Z and Q are input matrices. And if Q and Z are the orthogonal factors from the generalized Schur factorization of a matrix pair (A,B), then Z*X and Q*Y are the matrices of right and left eigenvectors of (A,B). Full circle, no cap π
βοΈ Parameters
SIDEβCHARACTER*1:= 'R': compute right eigenvectors only;= 'L': compute left eigenvectors only;= 'B': compute both right and left eigenvectors. go big π
HOWMNYβCHARACTER*1:= 'A': compute all right and/or left eigenvectors;= 'B': compute all right and/or left eigenvectors, backtransformed by the matrices inVRand/orVL;= 'S': compute selected right and/or left eigenvectors, specified by the logical arraySELECT.
SELECTβLOGICAL array, dimension (N). IfHOWMNY='S',SELECTspecifies the eigenvectors to be computed π―. Ifw(j)is a real eigenvalue, the corresponding real eigenvector is computed ifSELECT(j)is.TRUE.. Ifw(j)andw(j+1)are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if eitherSELECT(j)orSELECT(j+1)is.TRUE.β and on exit,SELECT(j)is set to.TRUE.andSELECT(j+1)is set to.FALSE.. So it tidies up after itself, we love that π. Not referenced ifHOWMNY = 'A'or'B'.Nβ INTEGER. The order of the matricesSandP.N >= 0.SβREAL array, dimension (LDS,N). The upper quasi-triangular matrixSfrom a generalized Schur factorization, as computed bySHGEQZ.LDSβ INTEGER. The leading dimension of arrayS.LDS >= max(1,N).PβREAL array, dimension (LDP,N). The upper triangular matrixPfrom a generalized Schur factorization, as computed bySHGEQZ. Important caveat bestie π¨: the 2-by-2 diagonal blocks ofPcorresponding to 2-by-2 blocks ofSmust be in positive diagonal form.LDPβ INTEGER. The leading dimension of arrayP.LDP >= max(1,N).
Still in STGEVC land, bestie β hereβs the rest of the real-version parameter list, no details skipped π
VLβ okay soVLis aREALarray, dimension(LDVL,MM). On entry, ifSIDE = 'L'or'B'andHOWMNY = 'B',VLmust contain anN-by-NmatrixQ(usually the orthogonal matrixQof left Schur vectors returned bySHGEQZ). On exit, ifSIDE = 'L'or'B',VLcontains: ifHOWMNY = 'A', the matrixYof left eigenvectors of(S,P); ifHOWMNY = 'B', the matrixQ*Y; ifHOWMNY = 'S', the left eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVL, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part. Not referenced ifSIDE = 'R'.LDVLβLDVLisINTEGER. Itβs the leading dimension of arrayVL.LDVL >= 1, and ifSIDE = 'L'or'B',LDVL >= N. periodt πVRβVRis aREALarray, dimension(LDVR,MM). On entry, ifSIDE = 'R'or'B'andHOWMNY = 'B',VRmust contain anN-by-NmatrixZ(usually the orthogonal matrixZof right Schur vectors returned bySHGEQZ). On exit, ifSIDE = 'R'or'B',VRcontains: ifHOWMNY = 'A', the matrixXof right eigenvectors of(S,P); ifHOWMNY = 'B'or'b', the matrixZ*X; ifHOWMNY = 'S'or's', the right eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVR, in the same order as their eigenvalues. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part and the second the imaginary part. Not referenced ifSIDE = 'L'.LDVRβLDVRisINTEGER. Itβs the leading dimension of the arrayVR.LDVR >= 1, and ifSIDE = 'R'or'B',LDVR >= N. slay, constraints understood π«ΆMMβMMisINTEGER. Itβs the number of columns in the arraysVLand/orVR.MM >= M. yes bestie,MMhas to be at leastMπMβMisINTEGER. Itβs the number of columns in the arraysVLand/orVRactually used to store the eigenvectors. IfHOWMNY = 'A'or'B',Mis set toN. Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns. two columns for complex vibes, no cap πWORKβWORKis aREALarray, dimension(6*N). six times N, sheβs got room to work πINFOβINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: the 2-by-2 block(INFO:INFO+1)does not have a complex eigenvalue. so ifINFO > 0, that 2-by-2 block is not giving complex eigenvalue energy π
β¨ Author β¨
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π§ Further Details: π§
Allocation of workspace:
WORK( j ) = 1-norm of j-th column of A, above the diagonal
WORK( N+j ) = 1-norm of j-th column of B, above the diagonal
WORK( 2*N+1:3*N ) = real part of eigenvector
WORK( 3*N+1:4*N ) = imaginary part of eigenvector
WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector
WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector
Rowwise vs. columnwise solution methods:
Finding a generalized eigenvector consists basically of solving the singular triangular system
(A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left)
Consider finding the i-th right eigenvector (assume all eigenvalues are real). The equation to be solved is:
n i
0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1
k=j k=j
where C = (A - w B) (The components v(i+1:n) are 0.)
The method is:
(1) v(i) := 1
for j = i-1,. . .,1:
i
(2) compute s = - sum C(j,k) v(k) and
k=j+1
(3) v(j) := s / C(j,j)
Step 2 is sometimes called the step β yes, bestie, the blank is literally in the source, not me π β since it is an inner product between the j-th row and the portion of the eigenvector that has been computed so far.
The method β again, blank in the source, Iβm just the messenger π β consists basically in doing the sums for all the rows in parallel. As each v(j) is computed, the contribution of v(j) times the j-th column of C is added to the partial sums. Since FORTRAN arrays are stored columnwise, this has the advantage that at each step, the elements of C that are accessed are adjacent to one another, whereas with the rowwise method, the elements accessed at a step are spaced LDS (and LDP) words apart.
When finding left eigenvectors, the matrix in question is the transpose of the one in storage, so the rowwise method then actually accesses columns of A and B at each step, and so is the preferred method.
π And the source says: Definition at line 293 of file stgevc.f.
subroutine ztgevc (character side, character howmny, logical, dimension( * )
select, integer n, complex*16, dimension( lds, * ) s, integer lds,
complex*16, dimension( ldp, * ) p, integer ldp, complex*16, dimension(
ldvl, * ) vl, integer ldvl, complex*16, dimension( ldvr, * ) vr, integer
ldvr, integer mm, integer m, complex*16, dimension( * ) work, double
precision, dimension( * ) rwork, integer info)
π ZTGEVC π
π Purpose: π
ZTGEVC computes some or all of the right and/or left eigenvectors of a pair of complex matrices (S,P), where S and P are upper triangular. Matrix pairs of this type are produced by the generalized Schur factorization of a complex matrix pair (A,B):
A = Q*S*Z**H, B = Q*P*Z**H
as computed by ZGGHRD + ZHGEQZ.
The right eigenvector x and the left eigenvector y of (S,P) corresponding to an eigenvalue w are defined by:
S*x = w*P*x, (y**H)*S = w*(y**H)*P,
where y**H denotes the conjugate transpose of y. The eigenvalues are not input to this routine, but are computed directly from the diagonal elements of S and P.
This routine returns the matrices X and/or Y of right and left eigenvectors of (S,P), or the products Z*X and/or Q*Y, where Z and Q are input matrices. If Q and Z are the unitary factors from the generalized Schur factorization of a matrix pair (A,B), then Z*X and Q*Y are the matrices of right and left eigenvectors of (A,B). iconic behavior, honestly π
π Parameters π
SIDEβSIDEisCHARACTER*1.= 'R': compute right eigenvectors only;= 'L': compute left eigenvectors only;= 'B': compute both right and left eigenvectors. pick your vibe, bestie π¦HOWMNYβHOWMNYisCHARACTER*1.= 'A': compute all right and/or left eigenvectors;= 'B': compute all right and/or left eigenvectors, backtransformed by the matrices inVRand/orVL;= 'S': compute selected right and/or left eigenvectors, specified by the logical arraySELECT. all, backtransformed, or selected β she contains multitudes β¨SELECTβSELECTis aLOGICALarray, dimension(N). IfHOWMNY='S',SELECTspecifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed ifSELECT(j) = .TRUE..Not referenced ifHOWMNY = 'A'or'B'.NβNisINTEGER. Itβs the order of the matricesSandP.N >= 0. nonnegative order, we love to see it πSβSis aCOMPLEX*16array, dimension(LDS,N). Itβs the upper triangular matrixSfrom a generalized Schur factorization, as computed byZHGEQZ. upper triangular and unbothered πLDSβLDSisINTEGER. Itβs the leading dimension of arrayS.LDS >= max(1,N). max of 1 and N, donβt forget πPβPis aCOMPLEX*16array, dimension(LDP,N). Itβs the upper triangular matrixPfrom a generalized Schur factorization, as computed byZHGEQZ.Pmust have real diagonal elements. real diagonal elements β that part is not optional, bestie π¨LDPβLDPisINTEGER. Itβs the leading dimension of arrayP.LDP >= max(1,N). same energy asLDS, just forPπ«ΆVLβVLis aCOMPLEX*16array, dimension(LDVL,MM). On entry, ifSIDE = 'L'or'B'andHOWMNY = 'B',VLmust contain anN-by-NmatrixQ(usually the unitary matrixQof left Schur vectors returned byZHGEQZ). On exit, ifSIDE = 'L'or'B',VLcontains: ifHOWMNY = 'A', the matrixYof left eigenvectors of(S,P); ifHOWMNY = 'B', the matrixQ*Y; ifHOWMNY = 'S', the left eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVL, in the same order as their eigenvalues. Not referenced ifSIDE = 'R'.LDVLβLDVLisINTEGER. Itβs the leading dimension of arrayVL.LDVL >= 1, and ifSIDE = 'L'or'l'or'B'or'b',LDVL >= N. lowercase and uppercase both count here, iykyk πVRβ
β¦and we're finishing up VR (the COMPLEX*16 array, dimension (LDVR,MM), remember her π):
- on entry, if
SIDE = 'R'or'B'andHOWMNY = 'B',VRmust contain an N-by-N matrixZβ usually the unitary matrixZof right Schur vectors returned byZHGEQZ. no cap, she has to be pre-loaded π«Ά - on exit, if
SIDE = 'R'or'B',VRcontains:- if
HOWMNY = 'A', the matrixXof right eigenvectors of(S,P); - if
HOWMNY = 'B', the matrixZ*X; - if
HOWMNY = 'S', the right eigenvectors of(S,P)specified bySELECT, stored consecutively in the columns ofVR, in the same order as their eigenvalues. iconic ordering behaviour, love that for us β¨
- if
- not referenced if
SIDE = 'L'. she's literally off duty bestie π
LDVRβLDVRisINTEGER. the leading dimension of the arrayVR.LDVR >= 1, and ifSIDE = 'R'or'B', thenLDVR >= N. respect the leading dimension or suffer the consequences πMMβMMisINTEGER. the number of columns in the arraysVLand/orVR.MM >= M. give her some room to breathe bestie πΈMβMisINTEGER. the number of columns in the arraysVLand/orVRactually used to store the eigenvectors. ifHOWMNY = 'A'or'B',Mis set toN. each selected eigenvector occupies one column. one eigenvector, one column, that's the vibe check βWORKβWORKisCOMPLEX*16array, dimension(2*N). scratch space, she's just here to do the work π§RWORKβRWORKisDOUBLE PRECISIONarray, dimension(2*N). more scratch space, this time the real kind πINFOβINFOisINTEGER, and she is the main character of error reporting π₯= 0: successful exit. we ate and left no crumbs π< 0: ifINFO = -i, the i-th argument had an illegal value. not me getting called out by an index π
β¨ Author β¨
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 217 of file ztgevc.f. (yes, the whole vibe lives at line 217, iykyk π)
β¨ Author β¨
Generated automatically by Doxygen for LAPACK from the source code. the robots wrote this one fr fr π€π
and that's the whole page bestie!! π this beauty is from LAPACK, Version 3.12.0 β the tgevc(3) page β and honestly? she's a lot, but she's our lot. go forth and compute those eigenvectors. slay, periodt, and remember: leading dimensions are not a suggestion π
ππ¦
π¦ 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