LA_TRIQL

The LA_TRIQL procedure uses the QL and QR variants of the implicitly-shifted QR algorithm to compute the eigenvalues and eigenvectors of a symmetric tridiagonal array. The LA_TRIRED routine can be used to reduce a real symmetric (or complex Hermitian) array to tridiagonal form suitable for input to this procedure.

LA_TRIQL is based on the following LAPACK routines:

 

Output Type

LAPACK Routine

Float

ssteqr

Double

dsteqr

Complex

csteqr

Double complex

zsteqr

Examples

The following example computes the eigenvalues and eigenvectors of a given symmetric array:

; Create a symmetric random array:

n = 4

seed = 12321

Array = RANDOMN(seed, n, n)

array = array + TRANSPOSE(array)

 

; Reduce to tridiagonal form

q = array ; make a copy

LA_TRIRED, q, d, e

 

; Compute eigenvalues and eigenvectors

eigenvalues = d

eigenvectors = q

LA_TRIQL, eigenvalues, e, eigenvectors

PRINT, 'LA_TRIQL eigenvalues:'

PRINT, eigenvalues

IDL prints:

LA_TRIQL eigenvalues:

-3.90712 -2.53874 2.14756 4.41393

Syntax

LA_TRIQL, D, E [, A] [, /DOUBLE] [, STATUS=variable]

Arguments

D

A named vector of length n containing the real diagonal elements, optionally created by the LA_TRIRED procedure. Upon output, D is replaced by a real vector of length n containing the eigenvalues.

E

The (n - 1) real subdiagonal elements, optionally created by the LA_TRIRED procedure. On output, the values within E are destroyed.

A

An optional named variable that returns the eigenvectors as a set of n row vectors. If the eigenvectors of a tridiagonal array are desired, A should be input as an identity array. If the eigenvectors of an array that has been reduced by LA_TRIRED are desired, A should be input as the Array output from LA_TRIRED. If A is not input, then eigenvectors are not computed. A may be either real or complex.

Keywords

DOUBLE

Set this keyword to use double-precision for computations and to return a double-precision (real or complex) result. Set DOUBLE = 0 to use single-precision for computations and to return a single-precision (real or complex) result. The default is DOUBLE = 0 if none of the inputs are double precision. If A is not input, then the default is /DOUBLE if D is double precision. If A is input, then the default is /DOUBLE if A is double precision (real or complex).

STATUS

Set this keyword to a named variable that will contain the status of the computation. Possible values are:

Note: If STATUS is not specified, any error messages will be output to the screen.

Version History

5.6

Introduced

Resources and References

For details see Anderson et al., LAPACK Users' Guide, 3rd ed., SIAM, 1999.

See Also

LA_TRIRED, TRIQL