NAG Library Function Document
nag_dtgsen (f08ygc)
1 Purpose
nag_dtgsen (f08ygc) reorders the generalized Schur factorization of a matrix pair in real generalized Schur form, so that a selected cluster of eigenvalues appears in the leading elements, or blocks on the diagonal of the generalized Schur form. The function also, optionally, computes the reciprocal condition numbers of the cluster of eigenvalues and/or corresponding deflating subspaces.
2 Specification
#include <nag.h> |
#include <nagf08.h> |
void |
nag_dtgsen (Nag_OrderType order,
Integer ijob,
Nag_Boolean wantq,
Nag_Boolean wantz,
const Nag_Boolean select[],
Integer n,
double a[],
Integer pda,
double b[],
Integer pdb,
double alphar[],
double alphai[],
double beta[],
double q[],
Integer pdq,
double z[],
Integer pdz,
Integer *m,
double *pl,
double *pr,
double dif[],
NagError *fail) |
|
3 Description
nag_dtgsen (f08ygc) factorizes the generalized real
by
matrix pair
in real generalized Schur form, using an orthogonal equivalence transformation as
where
are also in real generalized Schur form and have the selected eigenvalues as the leading diagonal elements, or diagonal blocks. The leading columns of
and
are the generalized Schur vectors corresponding to the selected eigenvalues and form orthonormal subspaces for the left and right eigenspaces (deflating subspaces) of the pair
.
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
. The diagonal elements, or blocks, define the generalized eigenvalues
, for
, of the pair
. The eigenvalues are given by
but are returned as the pair
in order to avoid possible overflow in computing
. Optionally, the function returns reciprocals of condition number estimates for the selected eigenvalue cluster,
and
, the right and left projection norms, and of deflating subspaces,
and
. For more information see Sections 2.4.8 and 4.11 of
Anderson et al. (1999).
If
and
are the result of a generalized Schur factorization of a matrix pair
then, optionally, the matrices
and
can be updated as
and
. Note that the condition numbers of the pair
are the same as those of the pair
.
4 References
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/lug5 Arguments
- 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 .
- 2:
ijob – IntegerInput
On entry: specifies whether condition numbers are required for the cluster of eigenvalues (
and
) or the deflating subspaces (
and
).
- Only reorder with respect to select. No extras.
- Reciprocal of norms of ‘projections’ onto left and right eigenspaces with respect to the selected cluster ( and ).
- The upper bounds on and . -norm-based estimate (stored in and respectively).
- Estimate of and . -norm-based estimate (stored in and respectively). About five times as expensive as .
- Compute pl, pr and dif as in , and . Economic version to get it all.
- Compute pl, pr and dif as in , and .
Constraint:
.
- 3:
wantq – Nag_BooleanInput
On entry: if
, update the left transformation matrix
.
If , do not update .
- 4:
wantz – Nag_BooleanInput
On entry: if
, update the right transformation matrix
.
If , do not update .
- 5:
select[n] – const Nag_BooleanInput
On entry: specifies the eigenvalues in the selected cluster. To select a real eigenvalue
,
must be set to Nag_TRUE.
To select a complex conjugate pair of eigenvalues and , corresponding to a by diagonal block, either or or both must be set to Nag_TRUE; a complex conjugate pair of eigenvalues must be either both included in the cluster or both excluded.
- 6:
n – IntegerInput
On entry: , the order of the matrices and .
Constraint:
.
- 7:
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 .
- 8:
pda – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
a.
Constraint:
.
- 9:
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
- 10:
pdb – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
b.
Constraint:
.
- 11:
alphar[n] – doubleOutput
On exit: see the description of
beta.
- 12:
alphai[n] – doubleOutput
On exit: see the description of
beta.
- 13:
beta[n] – doubleOutput
On exit:
and
are the real and imaginary parts respectively of the
th eigenvalue, for
.
If is zero, then the th eigenvalue is real; if positive then is negative, and the th and st eigenvalues are a complex conjugate pair.
Conjugate pairs of eigenvalues correspond to the
by
diagonal blocks of
. These
by
blocks can be reduced by applying complex unitary transformations to
to obtain the complex Schur form
, where
is triangular (and complex). In this form
and
beta are the diagonals of
and
respectively.
- 14:
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 by matrix .
On exit: if
, the updated matrix
.
If
,
q is not referenced.
- 15:
pdq – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
q.
Constraints:
- if , ;
- otherwise .
- 16:
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 by matrix .
On exit: if
, the updated matrix
.
If
,
z is not referenced.
- 17:
pdz – IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
z.
Constraints:
- if , ;
- otherwise .
- 18:
m – Integer *Output
On exit: the dimension of the specified pair of left and right eigenspaces (deflating subspaces).
- 19:
pl – double *Output
- 20:
pr – double *Output
On exit: if
,
or
,
pl and
pr are lower bounds on the reciprocal of the norm of ‘projections’
and
onto left and right eigenspaces with respect to the selected cluster.
,
.
If or , .
If
,
or
,
pl and
pr are not referenced.
- 21:
dif[] – doubleOutput
-
Note: the dimension,
dim, of the array
dif
must be at least
.
On exit: if
,
and
store the estimates of
and
.
If or , and are -norm-based upper bounds on and .
If or , and are -norm-based estimates of and .
If or , and .
If
or
,
dif is not referenced.
- 22:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
- 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: .
On entry, .
Constraint: .
- NE_INT_2
-
On entry, and .
Constraint: .
On entry, and .
Constraint: .
- 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
-
Reordering of
failed because the transformed matrix pair would be too far from generalized Schur form; the problem is very ill-conditioned.
may have been partially reordered. If requested,
is returned in
and
,
pl and
pr.
7 Accuracy
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, and for information on the condition numbers returned.
8 Parallelism and Performance
nag_dtgsen (f08ygc) is not threaded by NAG in any implementation.
nag_dtgsen (f08ygc) 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
Users' Note for your implementation for any additional implementation-specific information.
The complex analogue of this function is
nag_ztgsen (f08yuc).
10 Example
This example reorders the generalized Schur factors
and
and update the matrices
and
given by
selecting the first and fourth generalized eigenvalues to be moved to the leading positions. Bases for the left and right deflating subspaces, and estimates of the condition numbers for the eigenvalues and Frobenius norm based bounds on the condition numbers for the deflating subspaces are also output.
10.1 Program Text
Program Text (f08ygce.c)
10.2 Program Data
Program Data (f08ygce.d)
10.3 Program Results
Program Results (f08ygce.r)