NAG Library Function Document
nag_ztrsen (f08quc)
1 Purpose
nag_ztrsen (f08quc) reorders the Schur factorization of a complex general matrix so that a selected cluster of eigenvalues appears in the leading elements on the diagonal of the Schur form. The function also optionally computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.
2 Specification
#include <nag.h> |
#include <nagf08.h> |
void |
nag_ztrsen (Nag_OrderType order,
Nag_JobType job,
Nag_ComputeQType compq,
const Nag_Boolean select[],
Integer n,
Complex t[],
Integer pdt,
Complex q[],
Integer pdq,
Complex w[],
Integer *m,
double *s,
double *sep,
NagError *fail) |
|
3 Description
nag_ztrsen (f08quc) reorders the Schur factorization of a complex general matrix , so that a selected cluster of eigenvalues appears in the leading diagonal elements of the Schur form.
The reordered Schur form is computed by a unitary similarity transformation: . Optionally the updated matrix of Schur vectors is computed as , giving .
Let , where the selected eigenvalues are precisely the eigenvalues of the leading by sub-matrix . Let be correspondingly partitioned as where consists of the first columns of . Then , and so the columns of form an orthonormal basis for the invariant subspace corresponding to the selected cluster of eigenvalues.
Optionally the function also computes estimates of the reciprocal condition numbers of the average of the cluster of eigenvalues and of the invariant subspace.
4 References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Arguments
- 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.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.
Constraint:
or .
- 2:
– Nag_JobTypeInput
-
On entry: indicates whether condition numbers are required for the cluster of eigenvalues and/or the invariant subspace.
- No condition numbers are required.
- Only the condition number for the cluster of eigenvalues is computed.
- Only the condition number for the invariant subspace is computed.
- Condition numbers for both the cluster of eigenvalues and the invariant subspace are computed.
Constraint:
, , or .
- 3:
– Nag_ComputeQTypeInput
-
On entry: indicates whether the matrix
of Schur vectors is to be updated.
- The matrix of Schur vectors is updated.
- No Schur vectors are updated.
Constraint:
or .
- 4:
– const Nag_BooleanInput
-
Note: the dimension,
dim, of the array
select
must be at least
.
On entry: specifies the eigenvalues in the selected cluster. To select a complex eigenvalue , must be set Nag_TRUE.
- 5:
– IntegerInput
-
On entry: , the order of the matrix .
Constraint:
.
- 6:
– ComplexInput/Output
-
Note: the dimension,
dim, of the array
t
must be at least
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: the
by
upper triangular matrix
, as returned by
nag_zhseqr (f08psc).
On exit:
t is overwritten by the updated matrix
.
- 7:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
t.
Constraint:
.
- 8:
– ComplexInput/Output
-
Note: the dimension,
dim, of the array
q
must be at least
- when
;
- when
.
The
th element of the matrix
is stored in
- when ;
- when .
On entry: if
,
q must contain the
by
unitary matrix
of Schur vectors, as returned by
nag_zhseqr (f08psc).
On exit: if
,
q contains the updated matrix of Schur vectors; the first
columns of
form an orthonormal basis for the specified invariant subspace.
If
,
q is not referenced.
- 9:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
q.
Constraints:
- if , ;
- if , .
- 10:
– ComplexOutput
-
Note: the dimension,
dim, of the array
w
must be at least
.
On exit: the reordered eigenvalues of . The eigenvalues are stored in the same order as on the diagonal of .
- 11:
– Integer *Output
-
On exit:
, the dimension of the specified invariant subspace, which is the same as the number of selected eigenvalues (see
select);
.
- 12:
– double *Output
-
On exit: if
or
,
s is a lower bound on the reciprocal condition number of the average of the selected cluster of eigenvalues. If
,
.
If
or
,
s is not referenced.
- 13:
– double *Output
-
On exit: if
or
,
sep is the estimated reciprocal condition number of the specified invariant subspace. If
,
.
If
or
,
sep is not referenced.
- 14:
– 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.
See
Section 3.2.1.2 in the Essential Introduction for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_ENUM_INT_2
-
On entry, , and .
Constraint: if , ;
if , .
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_2
-
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.
An unexpected error has been triggered by this function. Please contact
NAG.
See
Section 3.6.6 in the Essential Introduction for further information.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 3.6.5 in the Essential Introduction for further information.
7 Accuracy
The computed matrix
is similar to a matrix
, where
and
is the
machine precision.
s cannot underestimate the true reciprocal condition number by more than a factor of
.
sep may differ from the true value by
. The angle between the computed invariant subspace and the true subspace is
.
The values of the eigenvalues are never changed by the reordering.
8 Parallelism and Performance
nag_ztrsen (f08quc) is not threaded by NAG in any implementation.
nag_ztrsen (f08quc) 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
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 real analogue of this function is
nag_dtrsen (f08qgc).
10 Example
This example reorders the Schur factorization of the matrix
such that the eigenvalues stored in elements
and
appear as the leading elements on the diagonal of the reordered matrix
, where
and
The original matrix
is given in
Section 10 in nag_zunghr (f08ntc).
10.1 Program Text
Program Text (f08quce.c)
10.2 Program Data
Program Data (f08quce.d)
10.3 Program Results
Program Results (f08quce.r)