SRC/ctrsna.f(3)
Okay bestie, youβre on the SRC/ctrsna.f(3) page from the Library Functions Manual, and itβs highkey a whole linear-algebra moment ππ
πΈ NAME πΈ
SRC/ctrsna.f β thatβs the name, periodt β¨
πΌ SYNOPSIS πΌ
π« Functions/Subroutines π«
subroutine ctrsna (job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr,
s, sep, mm, m, work, ldwork, rwork, info)
CTRSNA
π Function/Subroutine Documentation π
π subroutine ctrsna π
subroutine ctrsna (character job, character howmny, logical, dimension( * )
select, integer n, complex, dimension( ldt, * ) t, integer ldt, complex,
dimension( ldvl, * ) vl, integer ldvl, complex, dimension( ldvr, * ) vr,
integer ldvr, real, dimension( * ) s, real, dimension( * ) sep, integer
mm, integer m, complex, dimension( ldwork, * ) work, integer ldwork,
real, dimension( * ) rwork, integer info)
CTRSNA
π Purpose π
CTRSNA estimates reciprocal condition numbers for specified eigenvalues and/or right eigenvectors of a complex upper triangular matrix T (or of any matrix Q*T*Q**H with Q unitary). Thatβs the whole assignment, no cap π
β¨ Parameters β¨
JOBβ isCHARACTER*1. Specifies whether condition numbers are required for eigenvalues (S) or eigenvectors (SEP):'E': for eigenvalues only (S);'V': for eigenvectors only (SEP);'B': for both eigenvalues and eigenvectors (SandSEP).
HOWMNYβ isCHARACTER*1:'A': compute condition numbers for all eigenpairs;'S': compute condition numbers for selected eigenpairs specified by the arraySELECT.
SELECTβ isLOGICAL array, dimension (N). IfHOWMNY = 'S',SELECTspecifies the eigenpairs for which condition numbers are required. To select condition numbers for the j-th eigenpair,SELECT(j)must be set to.TRUE.. IfHOWMNY = 'A',SELECTis not referenced.Nβ isINTEGER. The order of the matrixT.N >= 0.Tβ isCOMPLEX array, dimension (LDT,N). The upper triangular matrixT.LDTβ isINTEGER. The leading dimension of the arrayT.LDT >= max(1,N).VLβ isCOMPLEX array, dimension (LDVL,M). IfJOB = 'E'or'B',VLmust contain left eigenvectors ofT(or of anyQ*T*Q**HwithQunitary), corresponding to the eigenpairs specified byHOWMNYandSELECT. The eigenvectors must be stored in consecutive columns ofVL, as returned byCHSEINorCTREVC. IfJOB = 'V',VLis not referenced.LDVLβ isINTEGER. The leading dimension of the arrayVL.LDVL >= 1; and ifJOB = 'E'or'B',LDVL >= N.VRβ isCOMPLEX array, dimension (LDVR,M). IfJOB = 'E'or'B',VRmust contain right eigenvectors ofT(or of anyQ*T*Q**HwithQunitary), corresponding to the eigenpairs specified byHOWMNYandSELECT. The eigenvectors must be stored in consecutive columns ofVR, as returned byCHSEINorCTREVC. IfJOB = 'V',VRis not referenced.LDVRβ isINTEGER. The leading dimension of the arrayVR.LDVR >= 1; and ifJOB = 'E'or'B',LDVR >= N.Sβ isREAL array, dimension (MM). IfJOB = 'E'or'B', the reciprocal condition numbers of the selected eigenvalues, stored in consecutive elements of the array. ThusS(j),SEP(j), and the j-th columns ofVLandVRall correspond to the same eigenpair (but not in general the j-th eigenpair, unless all eigenpairs are selected). IfJOB = 'V',Sis not referenced.SEPβ isREAL array, dimension (MM). IfJOB = 'V'or'B', the estimated reciprocal condition numbers of the selected eigenvectors, stored in consecutive elements of the array. IfJOB = 'E',SEPis not referenced.MMβ isINTEGER. The number of elements in the arraysS(ifJOB = 'E'or'B') and/orSEP(ifJOB = 'V'or'B').MM >= M.Mβ isINTEGER. The number of elements of the arraysSand/orSEPactually used to store the estimated condition numbers. IfHOWMNY = 'A',Mis set toN.WORKβ isCOMPLEX array, dimension (LDWORK,N+6). IfJOB = 'E',WORKis not referenced.LDWORKβ isINTEGER. The leading dimension of the arrayWORK.LDWORK >= 1; and ifJOB = 'V'or'B',LDWORK >= N.RWORKβ isREAL array, dimension (N). IfJOB = 'E',RWORKis not referenced.INFOβ isINTEGER.= 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.
π¦ Further Details π¦
The reciprocal of the condition number of an eigenvalue lambda is defined as
S(lambda) = |v**H*u| / (norm(u)*norm(v))
where u and v are the right and left eigenvectors of T corresponding to lambda; v**H denotes the conjugate transpose of v, and norm(u) denotes the Euclidean norm. These reciprocal condition numbers always lie between zero (very badly conditioned) and one (very well conditioned). If n = 1, S(lambda) is defined to be 1.
An approximate error bound for a computed eigenvalue W(i) is given by
EPS * norm(T) / S(i)
where EPS is the machine precision.
The reciprocal of the condition number of the right eigenvector u corresponding to lambda is defined as follows. Suppose
T = ( lambda c )
( 0 T22 )
Then the reciprocal condition number is
SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
where sigma-min denotes the smallest singular value. We approximate the smallest singular value by the reciprocal of an estimate of the one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is defined to be abs(T(1,1)).
An approximate error bound for a computed right eigenvector VR(i) is given by
EPS * norm(T) / SEP(i)
Definition at line 246 of file ctrsna.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
LAPACK Version 3.12.0 Β· SRC/ctrsna.f(3) β bye bestie, go estimate those condition numbers responsibly ππ«Ά
π¦ 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