f08psc computes all the eigenvalues and, optionally, the Schur factorization of a complex Hessenberg matrix or a complex general matrix which has been reduced to Hessenberg form.
The function may be called by the names: f08psc, nag_lapackeig_zhseqr or nag_zhseqr.
3Description
f08psc computes all the eigenvalues and, optionally, the Schur factorization of a complex upper Hessenberg matrix :
where is an upper triangular matrix (the Schur form of ), and is the unitary matrix whose columns are the Schur vectors . The diagonal elements of are the eigenvalues of .
The function may also be used to compute the Schur factorization of a complex general matrix which has been reduced to upper Hessenberg form :
In this case, after f08nsc has been called to reduce to Hessenberg form, f08ntc must be called to form explicitly; is then passed to f08psc, which must be called with .
The function can also take advantage of a previous call to f08nvc which may have balanced the original matrix before reducing it to Hessenberg form, so that the Hessenberg matrix has the structure:
where and are upper triangular. If so, only the central diagonal block (in rows and columns to ) needs to be further reduced to Schur form (the blocks and are also affected). Therefore, the values of and can be supplied to f08psc directly. Also, f08nwc must be called after this function to permute the Schur vectors of the balanced matrix to those of the original matrix. If f08nvc has not been called however, then must be set to and to . Note that if the Schur factorization of is required, f08nvc must not be called with or , because the balancing transformation is not unitary.
f08psc uses a multishift form of the upper Hessenberg algorithm, due to Bai and Demmel (1989). The Schur vectors are normalized so that , but are determined only to within a complex factor of absolute value .
4References
Bai Z and Demmel J W (1989) On a block implementation of Hessenberg multishift iteration Internat. J. High Speed Comput.1 97–112
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5Arguments
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.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint:
or .
2: – Nag_JobTypeInput
On entry: indicates whether eigenvalues only or the Schur form is required.
Eigenvalues only are required.
The Schur form is required.
Constraint:
or .
3: – Nag_ComputeZTypeInput
On entry: indicates whether the Schur vectors are to be computed.
No Schur vectors are computed (and the array z is not referenced).
The Schur vectors of are computed (and the array z must contain the matrix on entry).
The Schur vectors of are computed (and the array z is initialized by the function).
Constraint:
, or .
4: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
5: – IntegerInput
6: – IntegerInput
On entry: if the matrix has been balanced by f08nvc, ilo and ihi must contain the values returned by that function. Otherwise, ilo must be set to and ihi to n.
Constraint:
and .
7: – ComplexInput/Output
Note: the dimension, dim, of the array h
must be at least
.
The th element of the matrix is stored in
when ;
when .
On entry: the upper Hessenberg matrix , as returned by f08nsc.
On exit: if , the array contains no useful information.
If , h is overwritten by the upper triangular matrix from the Schur decomposition (the Schur form) unless NE_CONVERGENCE.
8: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array h.
Constraint:
.
9: – ComplexOutput
Note: the dimension, dim, of the array w
must be at least
.
On exit: the computed eigenvalues, unless NE_CONVERGENCE (in which case see Section 6). The eigenvalues are stored in the same order as on the diagonal of the Schur form (if computed).
10: – ComplexInput/Output
Note: the dimension, dim, of the array z
must be at least
when
or ;
when
.
The th element of the matrix is stored in
when ;
when .
On entry: if , z must contain the unitary matrix from the reduction to Hessenberg form.
On entry: the stride separating row or column elements (depending on the value of order) in the array z.
Constraints:
if or , ;
if , .
12: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_CONVERGENCE
The algorithm has failed to find all the eigenvalues after a total of iterations.
NE_ENUM_INT_2
On entry, , and .
Constraint: if or , ;
if , .
NE_INT
On entry, .
Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
NE_INT_2
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 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
7Accuracy
The computed Schur factorization is the exact factorization of a nearby matrix , where
and is the machine precision.
If is an exact eigenvalue, and is the corresponding computed value, then
where is a modestly increasing function of , and is the reciprocal condition number of . The condition numbers may be computed by calling f08qyc.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f08psc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08psc 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.
9Further Comments
The total number of real floating-point operations depends on how rapidly the algorithm converges, but is typically about: