nag_ztgexc (f08ytc) reorders the generalized Schur factorization of a complex matrix pair in generalized Schur form.
nag_ztgexc (f08ytc) reorders the generalized complex
by
matrix pair
in generalized Schur form, so that the diagonal element of
with row index
is moved to row
, using a unitary equivalence transformation. That is,
and
are factorized as
where
are also in generalized Schur form.
The pair
are in generalized Schur form if
and
are upper triangular as returned, for example, by
nag_zgges (f08xnc), or
nag_zhgeqz (f08xsc) 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[] – ComplexInput/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[] – ComplexInput/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[] – ComplexInput/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
unitary
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[] – ComplexInput/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
unitary
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 – IntegerInput
- 14:
ilst – Integer *Input/Output
-
On entry: the indices
and
that specify the reordering of the diagonal
elements
of
. The
element
with row index
ifst is moved to row
ilst, by a sequence of swapping between adjacent
diagonal elements.
On exit:
ilst points to the row in its final position.
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 real analogue of this function is
nag_dtgexc (f08yfc).
This example exchanges rows 4 and 1 of the matrix pair
, where
and