# naginterfaces.library.lapackeig.dstegr¶

naginterfaces.library.lapackeig.dstegr(jobz, erange, d, e, vl, vu, il, iu)[source]

dstegr computes selected eigenvalues and, optionally, the corresponding eigenvectors of a real symmetric tridiagonal matrix.

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

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f08/f08jlf.html

Parameters
jobzstr, length 1

Indicates whether eigenvectors are computed.

Only eigenvalues are computed.

Eigenvalues and eigenvectors are computed.

erangestr, length 1

Indicates which eigenvalues should be returned.

All eigenvalues will be found.

All eigenvalues in the half-open interval will be found.

The th through th eigenvectors will be found.

dfloat, array-like, shape

The diagonal elements of the tridiagonal matrix .

efloat, array-like, shape

to are the subdiagonal elements of the tridiagonal matrix . need not be set.

vlfloat

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

If or , and are not referenced.

vufloat

If , and contain the lower and upper bounds respectively 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.

Returns
dfloat, ndarray, shape

is overwritten.

efloat, ndarray, shape

is overwritten.

mint

The total number of eigenvalues found. .

If , .

If , .

wfloat, ndarray, shape

The eigenvalues in ascending order.

zfloat, ndarray, shape

If , then if no exception or warning is raised, the columns of contain the orthonormal eigenvectors of the matrix , 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 .

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 .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: and .

(errno )

The algorithm failed to converge.

(errno )

Inverse iteration failed to converge.

Notes

dstegr computes selected eigenvalues and, optionally, the corresponding eigenvectors, of a real symmetric tridiagonal matrix . That is, the function computes the (partial) spectral factorization of given by

where is a diagonal matrix whose diagonal elements are the selected eigenvalues, , of and is an orthogonal matrix whose columns are the corresponding eigenvectors, , of . Thus

where is the number of selected eigenvalues computed.

The function may also be used to compute selected eigenvalues and eigenvectors of a real symmetric matrix which has been reduced to tridiagonal form :

In this case, the matrix must be explicitly applied to the output matrix . The functions which must be called to perform the reduction to tridiagonal form and apply are:

 full matrix full matrix, packed storage band matrix dsbtrd() with vect='V' and blas.dgemm.

This function uses the dqds and the Relatively Robust Representation algorithms to compute the eigenvalues and eigenvectors respectively; see for example Parlett and Dhillon (2000) and Dhillon and Parlett (2004) for further details. dstegr can usually compute all the eigenvalues and eigenvectors in floating-point operations and so, for large matrices, is often considerably faster than the other symmetric tridiagonal functions in this module when all the eigenvectors are required, particularly so compared to those functions that are based on the algorithm.

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

Dhillon, I S and Parlett, B N, 2004, Orthogonal eigenvectors and relative gaps, SIAM J. Appl. Math. (25), 858–899

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