naginterfaces.library.lapackeig.dhseqr

naginterfaces.library.lapackeig.dhseqr(job, compz, ilo, ihi, h, z)[source]

dhseqr computes all the eigenvalues and, optionally, the Schur factorization of a real Hessenberg matrix or a real general matrix which has been reduced to Hessenberg form.

For full information please refer to the NAG Library document for f08pe

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f08/f08pef.html

Parameters
jobstr, length 1

Indicates whether eigenvalues only or the Schur form is required.

Eigenvalues only are required.

The Schur form is required.

compzstr, length 1

Indicates whether the Schur vectors are to be computed.

No Schur vectors are computed (and the array is not referenced).

The Schur vectors of are computed (and the array must contain the matrix on entry).

The Schur vectors of are computed (and the array is initialized by the function).

iloint

If the matrix has been balanced by dgebal(), and must contain the values returned by that function. Otherwise, must be set to and to .

ihiint

If the matrix has been balanced by dgebal(), and must contain the values returned by that function. Otherwise, must be set to and to .

hfloat, array-like, shape

The upper Hessenberg matrix , as returned by dgehrd().

zfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; otherwise: .

If , must contain the orthogonal matrix from the reduction to Hessenberg form.

If , need not be set.

Returns
hfloat, ndarray, shape

If , the array contains no useful information.

If , is overwritten by the upper quasi-triangular matrix from the Schur decomposition (the Schur form) unless > 0.

wrfloat, ndarray, shape

The real and imaginary parts, respectively, of the computed eigenvalues, unless > 0 (in which case see Exceptions). Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having positive imaginary part first. The eigenvalues are stored in the same order as on the diagonal of the Schur form (if computed); see Further Comments for details.

wifloat, ndarray, shape

The real and imaginary parts, respectively, of the computed eigenvalues, unless > 0 (in which case see Exceptions). Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having positive imaginary part first. The eigenvalues are stored in the same order as on the diagonal of the Schur form (if computed); see Further Comments for details.

zfloat, ndarray, shape

If or , contains the orthogonal matrix of the required Schur vectors, unless > 0.

If , is not referenced.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: or .

(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

(errno )

On entry, error in parameter .

Warns
NagAlgorithmicWarning
(errno )

The algorithm has failed to find all the eigenvalues after a total of iterations.

Notes

dhseqr computes all the eigenvalues and, optionally, the Schur factorization of a real upper Hessenberg matrix :

where is an upper quasi-triangular matrix (the Schur form of ), and is the orthogonal matrix whose columns are the Schur vectors . See Further Comments for details of the structure of .

The function may also be used to compute the Schur factorization of a real general matrix which has been reduced to upper Hessenberg form :

In this case, after dgehrd() has been called to reduce to Hessenberg form, dorghr() must be called to form explicitly; is then passed to dhseqr, which must be called with .

The function can also take advantage of a previous call to dgebal() 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 dhseqr directly. Also, dgebak() must be called after this function to permute the Schur vectors of the balanced matrix to those of the original matrix. If dgebal() has not been called however, then must be set to and to . Note that if the Schur factorization of is required, dgebal() must not be called with or , because the balancing transformation is not orthogonal.

dhseqr 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 factor .

References

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