The function may be called by the names: f08qfc, nag_lapackeig_dtrexc or nag_dtrexc.
3Description
f08qfc reorders the Schur factorization of a real general matrix , so that the diagonal element or block of with row index ifst is moved to row ilst.
The reordered Schur form is computed by an orthogonal similarity transformation: . Optionally the updated matrix of Schur vectors is computed as , giving .
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_ComputeQTypeInput
On entry: indicates whether the matrix of Schur vectors is to be updated.
The matrix of Schur vectors is updated.
No Schur vectors are updated.
Constraint:
or .
3: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
4: – doubleInput/Output
Note: the dimension, dim, of the array t
must be at least
.
The th element of the matrix is stored in
when ;
when .
On entry: the upper quasi-triangular matrix in canonical Schur form, as returned by f08pec.
On exit: t is overwritten by the updated matrix . See also Section 9.
5: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array t.
Constraint:
.
6: – doubleInput/Output
Note: the dimension, dim, of the array q
must be at least
when
;
when
.
The th element of the matrix is stored in
when ;
when .
On entry: if , q must contain the orthogonal matrix of Schur vectors.
On exit: if , q contains the updated matrix of Schur vectors.
On entry: the stride separating row or column elements (depending on the value of order) in the array q.
Constraints:
if , ;
if , .
8: – Integer *Input/Output
9: – Integer *Input/Output
On entry: ifst and ilst must specify the reordering of the diagonal elements or blocks of . The element or block with row index ifst is moved to row ilst by a sequence of exchanges between adjacent elements or blocks.
On exit: if ifst pointed to the second row of a block on entry, it is changed to point to the first row. ilst always points to the first row of the block in its final position (which may differ from its input value by ).
Constraint:
and .
10: – 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 , ;
if , .
NE_EXCHANGE
Two adjacent diagonal elements or blocks could not be successfully exchanged. This error can only occur if the exchange involves at least one block; it implies that the problem is very ill-conditioned, and that the eigenvalues of the two blocks are very close. On exit, may have been partially reordered, and ilst points to the first row of the current position of the block being moved; (if requested) is updated consistently with .
NE_INT
On entry, .
Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
NE_INT_2
On entry, and .
Constraint: .
NE_INT_3
On entry, , and .
Constraint: and .
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 matrix is exactly similar to a matrix , where
and is the machine precision.
Note that if a diagonal block is involved in the reordering, its off-diagonal elements are in general changed; the diagonal elements and the eigenvalues of the block are unchanged unless the block is sufficiently ill-conditioned, in which case they may be noticeably altered. It is possible for a block to break into two blocks, i.e., for a pair of complex eigenvalues to become purely real. The values of real eigenvalues however are never changed by the reordering.
8Parallelism and Performance
f08qfc 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
The total number of floating-point operations is approximately if , and if , where .
The input matrix must be in canonical Schur form, as is the output matrix . This has the following structure.
If all the computed eigenvalues are real, is upper triangular and its diagonal elements are the eigenvalues.
If some of the computed eigenvalues form complex conjugate pairs, then has diagonal blocks. Each diagonal block has the form