ZTREVC(3)
π ZTREVC (3) β bestie edition β¨
okay so this page lives at /home/abui...RC/ztrevc.f(3) in the Library Functions Manual, and it's a Fortran routine page from the LAPACK library β buckle up, we're doing eigenvectors π
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/ztrevc.f
that's it. that's the name. it's giving "my whole legal identity is a build path" π but slay, it's the source file for ZTREVC and it's iconic.
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine ZTREVC (side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr,
mm, m, work, rwork, info)
ZTREVC β that's the whole vibe, no cap π¦
π Function/Subroutine Documentation π
subroutine ZTREVC (character side, character howmny, logical, dimension( * )
select, integer n, complex*16, dimension( ldt, * ) t, integer ldt,
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)
ZTREVC π
π― Purpose:
!>
!> ZTREVC computes some or all of the right and/or left eigenvectors of
!> a complex upper triangular matrix T.
!> Matrices of this type are produced by the Schur factorization of
!> a complex general matrix: A = Q*T*Q**H, as computed by ZHSEQR.
!>
!> The right eigenvector x and the left eigenvector y of T corresponding
!> to an eigenvalue w are defined by:
!>
!> T*x = w*x, (y**H)*T = w*(y**H)
!>
!> where y**H denotes the conjugate transpose of the vector y.
!> The eigenvalues are not input to this routine, but are read directly
!> from the diagonal of T.
!>
!> This routine returns the matrices X and/or Y of right and left
!> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
!> input matrix. If Q is the unitary factor that reduces a matrix A to
!> Schur form T, then Q*X and Q*Y are the matrices of right and left
!> eigenvectors of A.
!>
so basically bestie: you hand it a complex upper triangular matrix T and it hands you back eigenvectors. where does a triangular T come from? from the Schur factorization of a complex general matrix β A = Q*T*Q**H, which is literally what ZHSEQR computes π₯
the definitions you need to keep in your notes app:
- right eigenvector
xand left eigenvectoryofTfor eigenvalueware defined byT*x = w*xand(y**H)*T = w*(y**H) y**H= the conjugate transpose of the vectory(yes, conjugate and transpose, both π)- eigenvalues are not an input here β it reads them straight off the diagonal of
T, main character energy π
and what you actually get out: the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y where Q is an input matrix. and if Q is the unitary factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A. periodt π
π 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 using the matrices supplied inVRand/orVL= 'S': compute selected right and/or left eigenvectors, as indicated by the logical arraySELECT
SELECTβSELECTisLOGICAL array, dimension (N)
if HOWMNY = 'S', SELECT specifies which eigenvectors get computed. the eigenvector corresponding to the j-th eigenvalue is computed if SELECT(j) = .TRUE.. not referenced if HOWMNY = 'A' or 'B' π
NβNisINTEGER
the order of the matrix T. N >= 0. (yes it can be zero, she contains multitudes)
TβTisCOMPLEX*16 array, dimension (LDT,N)
the upper triangular matrix T. heads up: T is modified, but restored on exit π§ so it gets rummaged through but she puts everything back, we love a considerate queen
LDTβLDTisINTEGER
the leading dimension of the array T. LDT >= max(1,N).
VLβVLisCOMPLEX*16 array, dimension (LDVL,MM)
on entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must contain an N-by-N matrix Q (usually the unitary matrix Q of Schur vectors returned by ZHSEQR).
on exit, if SIDE = 'L' or 'B', VL contains:
- if
HOWMNY = 'A', the matrixYof left eigenvectors ofT - if
HOWMNY = 'B', the matrixQ*Y - if
HOWMNY = 'S', the left eigenvectors ofTspecified bySELECT, stored consecutively in the columns ofVL, in the same order as their eigenvalues
not referenced if SIDE = 'R' β
LDVLβLDVLisINTEGER
the leading dimension of the array VL. LDVL >= 1, and if SIDE = 'L' or 'B', LDVL >= N.
VRβVRisCOMPLEX*16 array, dimension (LDVR,MM)
on entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must contain an N-by-N matrix Q (usually the unitary matrix Q of Schur vectors returned by ZHSEQR).
on exit, if SIDE = 'R' or 'B', VR contains:
- if
HOWMNY = 'A', the matrixXof right eigenvectors ofT - if
HOWMNY = 'B', the matrixQ*X - if
HOWMNY = 'S', the right eigenvectors ofTspecified bySELECT, stored consecutively in the columns ofVR, in the same order as their eigenvalues
not referenced if SIDE = 'L' π
LDVRβLDVRisINTEGER
the leading dimension of the array VR. LDVR >= 1, and if SIDE = 'R' or 'B'; LDVR >= N. (yes the original really does say 'B' with a semicolon there, we're keeping it exactly, character for character π)
MMβMMisINTEGER
the number of columns in the arrays VL and/or VR. MM >= M.
MβMisINTEGER
the number of columns in the arrays VL and/or VR actually used to store the eigenvectors. if HOWMNY = 'A' or 'B', M is set to N. each selected eigenvector occupies one column. one eigenvector, one column, no sharing, we don't do that here π
WORKβWORKisCOMPLEX*16 array, dimension (2*N)RWORKβRWORKisDOUBLE PRECISION array, dimension (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.
look at that group project actually working, we love to see it π
π Further Details:
!>
!> The algorithm used in this program is basically backward (forward)
!> substitution, with scaling to make the the code robust against
!> possible overflow.
!>
!> Each eigenvector is normalized so that the element of largest
!> magnitude has magnitude 1; here the magnitude of a complex number
!> (x,y) is taken to be |x| + |y|.
!>
okay so the algorithm is basically backward (forward) substitution, with scaling so the code stays robust against possible overflow π₯ (and yes the original says "the the", we are not fixing it, we respect the source π)
and the normalization tea: each eigenvector is normalized so that the element of largest magnitude has magnitude 1. and here's the catch β the magnitude of a complex number (x,y) is taken to be |x| + |y|. not the fancy square-root situation, just |x| + |y|. iykyk π
π Definition at line 216 of file ztrevc.f.
π§ Author
Generated automatically by Doxygen for LAPACK from the source code.
ngl if you got this far you're genuinely built different. go normalize an eigenvector, bestie π¦
okay so that's the whole page!! π this was LAPACK Version 3.12.0, dated to that same /home/abui...RC/ztrevc.f(3) path, and the manual page came from the Library Functions Manual β mwah, slay, bye ππ
π·
π¦ 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