|
|
◆ Dtrsna()
| Sub Dtrsna |
( |
Job As |
String, |
|
|
Howmny As |
String, |
|
|
Selct() As |
Boolean, |
|
|
N As |
Long, |
|
|
T() As |
Double, |
|
|
Vl() As |
Double, |
|
|
Vr() As |
Double, |
|
|
S() As |
Double, |
|
|
Sep() As |
Double, |
|
|
Mm As |
Long, |
|
|
M As |
Long, |
|
|
Info As |
Long |
|
) |
| |
Condition numbers for eigenvalues and/or eigenvectors of upper quasi-triangular matrix
- Purpose
- This routine estimates reciprocal condition numbers for specified eigenvalues and/or right eigenvectors of a real upper quasi-triangular matrix T (or of any matrix Q*T*Q^T with Q orthogonal).
T must be in Schur canonical form (as returned by Dhseqr), that is, block upper triangular with 1 x 1 and 2 x 2 diagonal blocks; each 2 x 2 diagonal block has its diagonal elements equal and its off-diagonal elements of opposite sign.
- Parameters
-
| [in] | Job | 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 (S and Sep). |
| [in] | Howmny | = "A": Compute condition numbers for all eigenpairs.
= "S": Compute condition numbers for selected eigenpairs specified by the array Selct(). |
| [in] | Selct() | Array Selct(LSelct - 1) (LSelct >= N)
If Howmny = "S", Selct() specifies the eigenpairs for which condition numbers are required. To select condition numbers for the eigenpair corresponding to a real eigenvalue W(j), Selct(j) must be set to True. To select condition numbers corresponding to a complex conjugate pair of eigenvalues W(j) and W(j+1), either Selct(j) or Selct(j+1) or both, must be set to True.
If Howmny = "A", Selct() is not referenced. |
| [in] | N | Order of the matrix T. (N >= 0) (If N = 0, returns without computation) |
| [in] | T() | Array T(LT1 - 1, LT2 - 1) (LT1 >= N, LT2 >= N)
The upper quasi-triangular matrix T in Schur canonical form. |
| [in] | Vl() | Array Vl(LVl1 - 1, LVl2 - 1) (LVl1 >= N, LVl2 >= MM)
If Job = "E" or "B", Vl() must contain left eigenvectors of T (or of any Q*T*Q^T with Q orthogonal), corresponding to the eigenpairs specified by Howmny and Selct(). The eigenvectors must be stored in consecutive columns of Vl(), as returned by Dhsein or Dtrevc.
If Job = "V", Vl() is not referenced. |
| [in] | Vr() | Array Vr(LVr1 - 1, LVr2 - 1) (LVr1 >= N, LVr2 >= MM)
If Job = "E" or "B", Vr() must contain right eigenvectors of T (or of any Q*T*Q^T with Q orthogonal), corresponding to the eigenpairs specified by Howmny and Selct(). The eigenvectors must be stored in consecutive columns of Vr(), as returned by Dhsein or Dtrevc.
If Job = "V", Vr() is not referenced. |
| [out] | S() | Array S(LS - 1) (LS >= MM)
If Job = "E" or "B", the reciprocal condition numbers of the selected eigenvalues, stored in consecutive elements of the array. For a complex conjugate pair of eigenvalues two consecutive elements of S() are set to the same value. Thus S(j), Sep(j), and the j-th columns of Vl() and Vr() all correspond to the same eigenpair (but not in general the j-th eigenpair, unless all eigenpairs are selected).
If Job = "V", S() is not referenced. |
| [out] | Sep() | Array Sep(LSep - 1) (LSep >= MM)
If Job = "V" or "B", the estimated reciprocal condition numbers of the selected eigenvectors, stored in consecutive elements of the array. For a complex eigenvector two consecutive elements of Sep() are set to the same value. If the eigenvalues cannot be reordered to compute Sep(j), Sep(j) is set to 0; this can only occur when the true value would be very small anyway.
If Job = "E", Sep() is not referenced. |
| [in] | MM | The number of elements in the arrays S() (if Job = "E" or "B") and/or Sep() (if Job = "V" or "B"). (mm >= M) |
| [out] | M | The number of elements of the arrays S() and/or Sep() actually used to store the estimated condition numbers.
If Howmny = "A", M is set to N. |
| [out] | Info | = 0: Successful exit.
= -1: The argument Job had an illegal value. (Job <> "E", "V" nor "B")
= -2: The argument Howmny had an illegal value. (Hownmy <> "A" nor "S")
= -3: The argument Selct() is invalid.
= -4: The argument N had an illegal value. (N < 0)
= -5: The argument T() is invalid.
= -6: The argument Vl() is invalid.
= -7: The argument Vr() is invalid.
= -8: The argument S() is invalid.
= -9: The argument Sep() is invalid.
= -10: The argument MM had an illegal value. (MM < M) |
- Further Details
- The reciprocal of the condition number of an eigenvalue lambda is defined as
S(lambda) = |v^T*u| / (norm(u)*norm(v))
where u and v are the right and left eigenvectors of T corresponding to lambda; v^T denotes the 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 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
- Reference
- LAPACK
|