The function may be called by the names: f08qlc, nag_lapackeig_dtrsna or nag_dtrsna.
3Description
f08qlc estimates condition numbers for specified eigenvalues and/or right eigenvectors of a real upper quasi-triangular matrix in canonical Schur form. These are the same as the condition numbers of the eigenvalues and right eigenvectors of an original matrix (with orthogonal ), from which may have been derived.
f08qlc computes the reciprocal of the condition number of an eigenvalue as
where and are the right and left eigenvectors of , respectively, corresponding to . This reciprocal condition number always lies between zero (i.e., ill-conditioned) and one (i.e., well-conditioned).
An approximate error estimate for a computed eigenvalue is then given by
where is the machine precision.
To estimate the reciprocal of the condition number of the right eigenvector corresponding to , the function first calls f08qfc to reorder the eigenvalues so that is in the leading position:
The reciprocal condition number of the eigenvector is then estimated as , the smallest singular value of the matrix . This number ranges from zero (i.e., ill-conditioned) to very large (i.e., well-conditioned).
An approximate error estimate for a computed right eigenvector corresponding to is then given by
4References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5Arguments
1: – Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by . See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint:
or .
2: – Nag_JobTypeInput
On entry: indicates whether condition numbers are required for eigenvalues and/or eigenvectors.
Condition numbers for eigenvalues only are computed.
Condition numbers for eigenvectors only are computed.
Condition numbers for both eigenvalues and eigenvectors are computed.
Constraint:
, or .
3: – Nag_HowManyTypeInput
On entry: indicates how many condition numbers are to be computed.
Condition numbers for all eigenpairs are computed.
Condition numbers for selected eigenpairs (as specified by select) are computed.
Constraint:
or .
4: – const Nag_BooleanInput
Note: the dimension, dim, of the array select
must be at least
On entry: specifies the eigenpairs for which condition numbers are to be computed if . To select condition numbers for the eigenpair corresponding to the real eigenvalue , must be set Nag_TRUE. To select condition numbers corresponding to a complex conjugate pair of eigenvalues and , and/or must be set to Nag_TRUE.
On entry: if or , vl must contain the left eigenvectors of (or of any matrix with orthogonal) corresponding to the eigenpairs specified by how_many and select. The eigenvectors must be stored in consecutive rows or columns of vl, as returned by f08pkcorf08qkc.
On entry: if or , vr must contain the right eigenvectors of (or of any matrix with orthogonal) corresponding to the eigenpairs specified by how_many and select. The eigenvectors must be stored in consecutive rows or columns of vr, as returned by f08pkcorf08qkc.
On exit: the reciprocal condition numbers of the selected eigenvalues if or , stored in consecutive elements of the array. Thus , and the th rows or columns of vl and vr all correspond to the same eigenpair (but not in general the th eigenpair unless all eigenpairs have been selected). For a complex conjugate pair of eigenvalues, two consecutive elements of s are set to the same value.
On exit: the estimated reciprocal condition numbers of the selected right eigenvectors if or , 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 , is set to zero; this can only occur when the true value would be very small anyway.
On entry: the number of elements in the arrays s and sep, and the number of rows or columns (depending on the value of order) in the arrays vl and vr (if used). The precise number required, , is if ; if , is obtained by counting for each selected real eigenvalue, and for each selected complex conjugate pair of eigenvalues (see select), in which case .
Constraint:
.
Constraint:
if , .
15: – Integer *Output
On exit: , the number of elements of s and/or sep actually used to store the estimated condition numbers. If , m is set to .
16: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_ENUM_INT_2
On entry, , and .
Constraint: if , .
On entry, , and .
Constraint: if or ,
.
On entry, , and .
Constraint: if or , .
On entry, , and .
Constraint: if or ,
.
On entry, , and .
Constraint: if or , .
NE_INT
On entry, .
Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
NE_INT_2
On entry, and .
Constraint: .
On entry, and .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
7Accuracy
The computed values may over estimate the true value, but seldom by a factor of more than .
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f08qlc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
For a description of canonical Schur form, see the document for f08pec.