The routine may be called by the names f08psf, nagf_lapackeig_zhseqr or its LAPACK name zhseqr.
f08psf 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 routine 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 f08nsf has been called to reduce to Hessenberg form, f08ntf must be called to form explicitly; is then passed to f08psf, which must be called with .
The routine can also take advantage of a previous call to f08nvf 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 f08psf directly. Also, f08nwf must be called after this routine to permute the Schur vectors of the balanced matrix to those of the original matrix. If f08nvf has not been called however, then must be set to and to . Note that if the Schur factorization of is required, f08nvf must not be called with or , because the balancing transformation is not unitary.
f08psf 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 .
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
1: – Character(1)Input
On entry: indicates whether eigenvalues only or the Schur form is required.
Eigenvalues only are required.
The Schur form is required.
2: – Character(1)Input
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 routine).
, or .
3: – IntegerInput
On entry: , the order of the matrix .
4: – IntegerInput
5: – IntegerInput
On entry: if the matrix has been balanced by f08nvf, ilo and ihi must contain the values returned by that routine. Otherwise, ilo must be set to and ihi to n.
6: – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array h
must be at least
On entry: the upper Hessenberg matrix , as returned by f08nsf.
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 .
7: – IntegerInput
On entry: the first dimension of the array h as declared in the (sub)program from which f08psf is called.
8: – Complex (Kind=nag_wp) arrayOutput
Note: the dimension of the array w
must be at least
On exit: the computed eigenvalues, unless (in which case see Section 6). The eigenvalues are stored in the same order as on the diagonal of the Schur form (if computed).
9: – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array z
must be at least
if or and at least if .
On entry: if , z must contain the unitary matrix from the reduction to Hessenberg form.
On entry: the first dimension of the array z as declared in the (sub)program from which f08psf is called.
if or , ;
if , .
11: – Complex (Kind=nag_wp) arrayWorkspace
On exit: if , the real part of contains the minimum value of lwork required for optimal performance.
12: – IntegerInput
On entry: the dimension of the array work as declared in the (sub)program from which f08psf is called, unless , in which case a workspace query is assumed and the routine only calculates the minimum dimension of work.
13: – IntegerOutput
On exit: unless the routine detects an error (see Section 6).
6Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
An explanatory message is output, and execution of the program is terminated.
The algorithm has failed to find all the eigenvalues after a total of iterations.
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 f08qyf.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f08psf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08psf 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 routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
The total number of real floating-point operations depends on how rapidly the algorithm converges, but is typically about: