NAG FL Interface
f08qff (dtrexc)
1
Purpose
f08qff reorders the Schur factorization of a real general matrix.
2
Specification
Fortran Interface
Integer, Intent (In) |
:: |
n, ldt, ldq |
Integer, Intent (Inout) |
:: |
ifst, ilst |
Integer, Intent (Out) |
:: |
info |
Real (Kind=nag_wp), Intent (Inout) |
:: |
t(ldt,*), q(ldq,*) |
Real (Kind=nag_wp), Intent (Out) |
:: |
work(n) |
Character (1), Intent (In) |
:: |
compq |
|
C Header Interface
#include <nag.h>
void |
f08qff_ (const char *compq, const Integer *n, double t[], const Integer *ldt, double q[], const Integer *ldq, Integer *ifst, Integer *ilst, double work[], Integer *info, const Charlen length_compq) |
|
C++ Header Interface
#include <nag.h> extern "C" {
void |
f08qff_ (const char *compq, const Integer &n, double t[], const Integer &ldt, double q[], const Integer &ldq, Integer &ifst, Integer &ilst, double work[], Integer &info, const Charlen length_compq) |
}
|
The routine may be called by the names f08qff, nagf_lapackeig_dtrexc or its LAPACK name dtrexc.
3
Description
f08qff 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 .
4
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5
Arguments
-
1:
– Character(1)
Input
-
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 .
-
2:
– Integer
Input
-
On entry: , the order of the matrix .
Constraint:
.
-
3:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
t
must be at least
.
On entry: the
by
upper quasi-triangular matrix
in canonical Schur form, as returned by
f08pef.
On exit:
t is overwritten by the updated matrix
. See also
Section 9.
-
4:
– Integer
Input
-
On entry: the first dimension of the array
t as declared in the (sub)program from which
f08qff is called.
Constraint:
.
-
5:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
q
must be at least
if
and at least
if
.
On entry: if
,
q must contain the
by
orthogonal matrix
of Schur vectors.
On exit: if
,
q contains the updated matrix of Schur vectors.
If
,
q is not referenced.
-
6:
– Integer
Input
-
On entry: the first dimension of the array
q as declared in the (sub)program from which
f08qff is called.
Constraints:
- if , ;
- if , .
-
7:
– Integer
Input/Output
-
8:
– 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
by
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 .
-
9:
– Real (Kind=nag_wp) array
Workspace
-
-
10:
– Integer
Output
-
On exit:
unless the routine detects an error (see
Section 6).
6
Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
-
Two adjacent diagonal elements or blocks could not be successfully exchanged. This error can only occur if the exchange involves at least one
by
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
.
7
Accuracy
The computed matrix
is exactly similar to a matrix
, where
and
is the
machine precision.
Note that if a by 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 by block to break into two by 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.
8
Parallelism and Performance
f08qff 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 routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
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
by
diagonal blocks. Each diagonal block has the form
where
. The corresponding eigenvalues are
.
The complex analogue of this routine is
f08qtf.
10
Example
This example reorders the Schur factorization of the matrix
so that the
by
block with row index
is moved to row
, where
10.1
Program Text
10.2
Program Data
10.3
Program Results