nag_dtgexc (f08yfc) reorders the generalized Schur factorization of a matrix pair in real generalized Schur form.
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:
order – 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.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.
Constraint:
or Nag_ColMajor.
- 2:
wantq – Nag_BooleanInput
-
On entry: if
, update the left transformation matrix
.
If , do not update .
- 3:
wantz – Nag_BooleanInput
-
On entry: if
, update the right transformation matrix
.
If , do not update .
- 4:
n – IntegerInput
-
On entry:
, the order of the matrices
and .
Constraint:
.
- 5:
a[] – 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:
pda – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
a.
Constraint:
.
- 7:
b[] – 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:
pdb – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
b.
Constraint:
.
- 9:
q[] – 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:
pdq – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
q.
Constraints:
- if , ;
- otherwise .
- 11:
z[] – 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:
pdz – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
z.
Constraints:
- if , ;
- otherwise .
- 13:
ifst – Integer *Input/Output
- 14:
ilst – 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:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
- NE_ALLOC_FAIL
Dynamic memory allocation failed.
- 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.
- 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.
The complex analogue of this function is
nag_ztgexc (f08ytc).
This example exchanges blocks
and
of the matrix pair
, where