naginterfaces.library.lapackeig.zheevr

naginterfaces.library.lapackeig.zheevr(jobz, erange, uplo, a, vl, vu, il, iu, abstol)[source]

zheevr computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix . Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.

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

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/f08/f08frf.html

Parameters
jobzstr, length 1

Indicates whether eigenvectors are computed.

Only eigenvalues are computed.

Eigenvalues and eigenvectors are computed.

erangestr, length 1

If , all eigenvalues will be found.

If , all eigenvalues in the half-open interval will be found.

If , the th to th eigenvalues will be found.

For or and , dstebz() and zstein() are called.

uplostr, length 1

If , the upper triangular part of is stored.

If , the lower triangular part of is stored.

acomplex, array-like, shape

The Hermitian matrix .

vlfloat

If , the lower and upper bounds of the interval to be searched for eigenvalues.

If or , and are not referenced.

vufloat

If , the lower and upper bounds of the interval to be searched for eigenvalues.

If or , and are not referenced.

ilint

If , and specify the indices (in ascending order) of the smallest and largest eigenvalues to be returned, respectively.

If or , and are not referenced.

iuint

If , and specify the indices (in ascending order) of the smallest and largest eigenvalues to be returned, respectively.

If or , and are not referenced.

abstolfloat

The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval of width less than or equal to

where is the machine precision. If is less than or equal to zero, then will be used in its place, where is the real tridiagonal matrix obtained by reducing to tridiagonal form. See Demmel and Kahan (1990).

If high relative accuracy is important, set to , although doing so does not currently guarantee that eigenvalues are computed to high relative accuracy.

See Barlow and Demmel (1990) for a discussion of which matrices can define their eigenvalues to high relative accuracy.

Returns
acomplex, ndarray, shape

The lower triangle (if ) or the upper triangle (if ) of , including the diagonal, is overwritten.

mint

The total number of eigenvalues found. .

If , .

If , .

wfloat, ndarray, shape

The first elements contain the selected eigenvalues in ascending order.

zcomplex, ndarray, shape

If , the first columns of contain the orthonormal eigenvectors of the matrix corresponding to the selected eigenvalues, with the th column of holding the eigenvector associated with .

If , is not referenced.

Note: you must ensure that at least columns are supplied in the array ; if , the exact value of is not known in advance and an upper bound of at least must be used.

isuppzint, ndarray, shape

The support of the eigenvectors in , i.e., the indices indicating the nonzero elements in . The th eigenvector is nonzero only in elements through . Implemented only for or and .

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: or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

(errno )

On entry, error in parameter .

(errno )

zheevr failed to converge.

Notes

The Hermitian matrix is first reduced to a real tridiagonal matrix , using unitary similarity transformations. Then whenever possible, zheevr computes the eigenspectrum using Relatively Robust Representations. zheevr computes eigenvalues by the dqds algorithm, while orthogonal eigenvectors are computed from various ‘good’ representations (also known as Relatively Robust Representations). Gram–Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows. For the th unreduced block of :

  1. compute , such that is a relatively robust representation,

  2. compute the eigenvalues, , of to high relative accuracy by the dqds algorithm,

  3. if there is a cluster of close eigenvalues, ‘choose’ close to the cluster, and go to (a),

  4. given the approximate eigenvalue of , compute the corresponding eigenvector by forming a rank-revealing twisted factorization.

The desired accuracy of the output can be specified by the argument . For more details, see Dhillon (1997) and Parlett and Dhillon (2000).

References

Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia, https://www.netlib.org/lapack/lug

Barlow, J and Demmel, J W, 1990, Computing accurate eigensystems of scaled diagonally dominant matrices, SIAM J. Numer. Anal. (27), 762–791

Demmel, J W and Kahan, W, 1990, Accurate singular values of bidiagonal matrices, SIAM J. Sci. Statist. Comput. (11), 873–912

Dhillon, I, 1997, A new algorithm for the symmetric tridiagonal eigenvalue/eigenvector problem, Computer Science Division Technical Report No. UCB//CSD-97-971, UC Berkeley

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore

Parlett, B N and Dhillon, I S, 2000, Relatively robust representations of symmetric tridiagonals, Linear Algebra Appl. (309), 121–151