nag_dtgexc (f08yfc) reorders the generalized real
by
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
by
and
by
diagonal blocks and
is upper triangular as returned, for example, by
nag_dgges (f08xac), or
nag_dhgeqz (f08xec) 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
http://www.netlib.org/lapack/lug
- 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.3.1.3 in How to Use the NAG Library and its Documentation for a more detailed explanation of the use of this argument.
Constraint:
or .
- 2:
– Nag_BooleanInput
-
On entry: if
, update the left transformation matrix
.
If , do not update .
- 3:
– Nag_BooleanInput
-
On entry: if
, update the right transformation matrix
.
If , do not update .
- 4:
– IntegerInput
-
On entry: , the order of the matrices and .
Constraint:
.
- 5:
– doubleInput/Output
-
Note: the dimension,
dim, of the array
a
must be at least
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: the matrix in the pair .
On exit: the updated matrix .
- 6:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
a.
Constraint:
.
- 7:
– doubleInput/Output
-
Note: the dimension,
dim, of the array
b
must be at least
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: the matrix , in the pair .
On exit: the updated matrix
- 8:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
b.
Constraint:
.
- 9:
– doubleInput/Output
-
Note: the dimension,
dim, of the array
q
must be at least
- when
;
- otherwise.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: if , the orthogonal matrix .
On exit: if
, the updated matrix
.
If
,
q is not referenced.
- 10:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
q.
Constraints:
- if , ;
- otherwise .
- 11:
– doubleInput/Output
-
Note: the dimension,
dim, of the array
z
must be at least
- when
;
- otherwise.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: if , the orthogonal matrix .
On exit: if
, the updated matrix
.
If
,
z is not referenced.
- 12:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
z.
Constraints:
- if , ;
- otherwise .
- 13:
– Integer *Input/Output
- 14:
– 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
by
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 .
- 15:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.7 in How to Use the NAG Library and its Documentation).
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_CONSTRAINT
-
On entry, , and .
Constraint: if , ;
otherwise .
On entry, , and .
Constraint: if , ;
otherwise .
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_2
-
On entry, and .
Constraint: .
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 2.7.6 in How to Use the NAG Library and its Documentation for further information.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.
- NE_SCHUR
-
The transformed matrix pair would be too far from generalized Schur form; the problem is ill-conditioned.
may have been partially reordered, and
ilst points to the first row of the current position of the block being moved.
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.
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.
The complex analogue of this function is
nag_ztgexc (f08ytc).
This example exchanges blocks
and
of the matrix pair
, where