naginterfaces.library.lapackeig.dtrsen¶
- naginterfaces.library.lapackeig.dtrsen(job, compq, select, t, q)[source]¶
dtrsen
reorders the Schur factorization of a real general matrix so that a selected cluster of eigenvalues appears in the leading elements or blocks on the diagonal of the Schur form. The function also optionally computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.For full information please refer to the NAG Library document for f08qg
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08qgf.html
- Parameters
- jobstr, length 1
Indicates whether condition numbers are required for the cluster of eigenvalues and/or the invariant subspace.
No condition numbers are required.
Only the condition number for the cluster of eigenvalues is computed.
Only the condition number for the invariant subspace is computed.
Condition numbers for both the cluster of eigenvalues and the invariant subspace are computed.
- compqstr, length 1
Indicates whether the matrix of Schur vectors is to be updated.
The matrix of Schur vectors is updated.
No Schur vectors are updated.
- selectbool, array-like, shape
The eigenvalues in the selected cluster. To select a real eigenvalue , must be set . To select a complex conjugate pair of eigenvalues and (corresponding to a diagonal block), and/or must be set to . A complex conjugate pair of eigenvalues must be either both included in the cluster or both excluded. See also Further Comments.
- tfloat, array-like, shape
The upper quasi-triangular matrix in canonical Schur form, as returned by
dhseqr()
. See also Further Comments.- qfloat, array-like, shape
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 : ; if : ; otherwise: .
If , must contain the orthogonal matrix of Schur vectors, as returned by
dhseqr()
.
- Returns
- tfloat, ndarray, shape
is overwritten by the updated matrix .
- qfloat, ndarray, shape
If , contains the updated matrix of Schur vectors; the first columns of form an orthonormal basis for the specified invariant subspace.
If , is not referenced.
- wrfloat, ndarray, shape
The real and imaginary parts, respectively, of the reordered eigenvalues of . The eigenvalues are stored in the same order as on the diagonal of ; see Further Comments for details. Note that if a complex eigenvalue is sufficiently ill-conditioned, then its value may differ significantly from its value before reordering.
- wifloat, ndarray, shape
The real and imaginary parts, respectively, of the reordered eigenvalues of . The eigenvalues are stored in the same order as on the diagonal of ; see Further Comments for details. Note that if a complex eigenvalue is sufficiently ill-conditioned, then its value may differ significantly from its value before reordering.
- mint
, the dimension of the specified invariant subspace. The value of is obtained by counting for each selected real eigenvalue and for each selected complex conjugate pair of eigenvalues (see ); .
- sfloat
If or , is a lower bound on the reciprocal condition number of the average of the selected cluster of eigenvalues. If or , ; if = 1 (see Exceptions), is set to zero.
If or , is not referenced.
- sepfloat
If or , is the estimated reciprocal condition number of the specified invariant subspace. If or , ; if = 1 (see Exceptions), is set to zero.
If or , is not referenced.
- 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: .
- Warns
- NagAlgorithmicWarning
- (errno )
The reordering of failed because a selected eigenvalue was too close to an unselected eigenvalue.
- Notes
dtrsen
reorders the Schur factorization of a real general matrix , so that a selected cluster of eigenvalues appears in the leading diagonal elements or blocks of the Schur form.The reordered Schur form is computed by an orthogonal similarity transformation: . Optionally the updated matrix of Schur vectors is computed as , giving .
Let , where the selected eigenvalues are precisely the eigenvalues of the leading sub-matrix . Let be correspondingly partitioned as where consists of the first columns of . Then , and so the columns of form an orthonormal basis for the invariant subspace corresponding to the selected cluster of eigenvalues.
Optionally the function also computes estimates of the reciprocal condition numbers of the average of the cluster of eigenvalues and of the invariant subspace.
- References
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore