f08yff reorders the generalized real
matrix pair
in real generalized Schur form, so that the diagonal element or block of
with row index
is moved to row
, using an orthogonal equivalence transformation. That is,
and
are factorized as
where
are also in real generalized Schur form.
The pair
are in real generalized Schur form if
is block upper triangular with
and
diagonal blocks and
is upper triangular as returned, for example, by
f08xcf, or
f08xef with
.
If
and
are the result of a generalized Schur factorization of a matrix pair
then, optionally, the matrices
and
can be updated as
and
.
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)
LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
https://www.netlib.org/lapack/lug
-
1:
– Logical
Input
-
On entry: if
, update the left transformation matrix
.
If , do not update .
-
2:
– Logical
Input
-
On entry: if
, update the right transformation matrix
.
If , do not update .
-
3:
– Integer
Input
-
On entry: , the order of the matrices and .
Constraint:
.
-
4:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
a
must be at least
.
On entry: the matrix in the pair .
On exit: the updated matrix .
-
5:
– Integer
Input
-
On entry: the first dimension of the array
a as declared in the (sub)program from which
f08yff is called.
Constraint:
.
-
6:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
b
must be at least
.
On entry: the matrix , in the pair .
On exit: the updated matrix
-
7:
– Integer
Input
-
On entry: the first dimension of the array
b as declared in the (sub)program from which
f08yff is called.
Constraint:
.
-
8:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
q
must be at least
if
, and at least
otherwise.
On entry: if , the orthogonal matrix .
On exit: if
, the updated matrix
.
If
,
q is not referenced.
-
9:
– Integer
Input
-
On entry: the first dimension of the array
q as declared in the (sub)program from which
f08yff is called.
Constraints:
- if , ;
- otherwise .
-
10:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
z
must be at least
if
, and at least
otherwise.
On entry: if , the orthogonal matrix .
On exit: if
, the updated matrix
.
If
,
z is not referenced.
-
11:
– Integer
Input
-
On entry: the first dimension of the array
z as declared in the (sub)program from which
f08yff is called.
Constraints:
- if , ;
- otherwise .
-
12:
– Integer
Input/Output
-
13:
– Integer
Input/Output
-
On entry: the indices
and
that specify the reordering of the diagonal blocks of
. The block with row index
ifst is moved to row
ilst, by a sequence of swapping between adjacent blocks.
On exit: if
ifst pointed on entry to the second row of a
block, 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
or
).
Constraint:
and .
-
14:
– Real (Kind=nag_wp) array
Workspace
-
On exit: if
,
contains the minimum value of
lwork required for optimal performance.
-
15:
– Integer
Input
-
On entry: the dimension of the array
work as declared in the (sub)program from which
f08yff is called.
If
, a workspace query is assumed; the routine only calculates the minimum size of the
work array, returns this value as the first entry of the
work array, and no error message related to
lwork is issued.
Constraints:
if
,
- if , ;
- otherwise .
-
16:
– Integer
Output
-
On exit:
unless the routine detects an error (see
Section 6).
The computed generalized Schur form is nearly the exact generalized Schur form for nearby matrices
and
, where
and
is the
machine precision. See Section 4.11 of
Anderson et al. (1999) for further details of error bounds for the generalized nonsymmetric eigenproblem.
Background information to multithreading can be found in the
Multithreading documentation.
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 complex analogue of this routine is
f08ytf.
This example exchanges blocks
and
of the matrix pair
, where