naginterfaces.library.lapackeig.dtrsna

naginterfaces.library.lapackeig.dtrsna(job, howmny, t, select=None, vl=None, vr=None)[source]

dtrsna estimates condition numbers for specified eigenvalues and/or right eigenvectors of a real upper quasi-triangular matrix.

For full information please refer to the NAG Library document for f08ql

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/f08/f08qlf.html

Parameters
jobstr, length 1

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.

howmnystr, length 1

Indicates how many condition numbers are to be computed.

Condition numbers for all eigenpairs are computed.

Condition numbers for selected eigenpairs (as specified by ) are computed.

tfloat, array-like, shape

The upper quasi-triangular matrix in canonical Schur form, as returned by dhseqr().

selectNone or bool, array-like, shape , optional

Note: the required length for this argument is determined as follows: if : ; otherwise: .

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 . To select condition numbers corresponding to a complex conjugate pair of eigenvalues and , and/or must be set to .

If , is not referenced.

vlNone or float, array-like, shape , optional

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If or , must contain the left eigenvectors of (or of any matrix with orthogonal) corresponding to the eigenpairs specified by and . The eigenvectors must be stored in consecutive columns of , as returned by dtrevc() or dhsein().

If , is not referenced.

vrNone or float, array-like, shape , optional

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If or , must contain the right eigenvectors of (or of any matrix with orthogonal) corresponding to the eigenpairs specified by and . The eigenvectors must be stored in consecutive columns of , as returned by dtrevc() or dhsein().

If , is not referenced.

Returns
sNone or float, ndarray, shape

The reciprocal condition numbers of the selected eigenvalues if or , stored in consecutive elements of the array. Thus , and the th columns of and 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 are set to the same value.

If , is not referenced.

sepNone or float, ndarray, shape

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 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.

If , is not referenced.

mint

, the number of elements of and/or actually used to store the estimated condition numbers. If , is set to .

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Notes

dtrsna 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.

dtrsna 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 dtrexc() 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

References

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore