|
NAG[f08psc] NAG[nag_zhseqr] - Eigenvalues and Schur factorization of complex upper Hessenberg matrix reduced from complex general matrix
|
|
Calling Sequence
f08psc(job, compz, ilo, ihi, h, w, z, 'n'=n, 'fail'=fail)
nag_zhseqr(. . .)
Parameters
|
job - String;
|
|
|
On entry: indicates whether eigenvalues only or the Schur form is required.
|
|
Eigenvalues only are required.
|
|
The Schur form is required.
|
|
Constraint: "Nag_EigVals" or "Nag_Schur". .
|
|
|
compz - String;
|
|
|
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 is initialized by the function).
|
|
Constraint: "Nag_NotZ", "Nag_UpdateZ" or "Nag_InitZ". .
|
|
|
ilo - integer;
ihi - integer;
|
|
|
On entry: if the matrix has been balanced by f08nvc (nag_zgebal), then ilo and ihi must contain the values returned by that function. Otherwise, ilo must be set to 1 and ihi to n.
|
|
Constraint: and . .
|
|
|
h - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On exit: if , the array contains no useful information.
|
|
|
w - Vector(1..dim, datatype=complex[8]);
|
|
|
Note: the dimension, dim, of the array w must be at least .
|
|
On exit: the computed eigenvalues, unless (in which case see Section [Error Indicators and Warnings]). The eigenvalues are stored in the same order as on the diagonal of the Schur form (if computed).
|
|
|
z - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On entry: if , z must contain the unitary matrix from the reduction to Hessenberg form.
|
|
If , z need not be set.
|
|
If , z is not referenced.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array h.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_zhseqr (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.
|
|
Description
|
|
nag_zhseqr (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 (nag_zgehrd) has been called to reduce to Hessenberg form, f08ntc (nag_zunghr) must be called to form explicitly; is then passed to nag_zhseqr (f08psc), which must be called with .
The function can also take advantage of a previous call to f08nvc (nag_zgebal) 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 nag_zhseqr (f08psc) directly. Also, f08nwc (nag_zgebak) must be called after this function to permute the Schur vectors of the balanced matrix to those of the original matrix. If f08nvc (nag_zgebal) has not been called however, then must be set to 1 and to . Note that if the Schur factorization of is required, f08nvc (nag_zgebal) must not be called with "Nag_Schur" or "Nag_DoBoth", because the balancing transformation is not unitary.
nag_zhseqr (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 1.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"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_INT"
On entry, . Constraint: .
"NE_INT_3"
On entry, , , . 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 consult NAG for assistance.
|
|
Further Comments
|
|
The total number of real floating-point operations depends on how rapidly the algorithm converges, but is typically about:
|
if only eigenvalues are computed;
|
|
if the Schur form is computed;
|
|
if the full Schur factorization is computed.
|
The real analogue of this function is f08pec (nag_dhseqr).
|
|
|
Examples
|
|
>
|
job := "Nag_Schur":
compz := "Nag_InitZ":
n := 4:
ilo := 1:
ihi := 4:
h := Matrix([[-3.97 -5.04*I , -1.1318 -2.5693*I , -4.6027 -0.1426*I , -1.4249 +1.733*I ], [-5.4797 +0*I , 1.8585 -1.5502*I , 4.4145 -0.7638*I , -0.4805 -1.1976*I ], [0 +0*I , 6.2673 +0*I , -0.4504 -0.029*I , -1.3467 +1.6579*I ], [0 +0*I , 0 +0*I , -3.5 +0*I , 2.5619 -3.3708*I ]], datatype=complex[8]):
h_orig := copy(h):
w := Vector(4, datatype=complex[8]):
z := Matrix([[0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ]], datatype=complex[8]):
NAG:-f08psc(job, compz, ilo, ihi, h, w, z, 'n' = n):
|
|
|
See Also
|
|
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
f08 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|