Previous IDL Reference Guide: Procedures and Functions Next

LA_TRIQL

Syntax | Arguments | Keywords | Examples | Version History | See Also

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:

Table 3-70: LAPACK Routine Basis for LA_TRIQL

Table 3-70: LAPACK Routine Basis for LA_TRIQL
Output Type
LAPACK Routine
Float
ssteqr
Double
dsteqr
Complex
csteqr
Double complex
zsteqr

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

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:

Examples

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

PRO ExLA_TRIQL  
; 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  
END  

When this program is compiled and run, IDL prints:

LA_TRIQL eigenvalues:  
-2.87710    -0.663354      2.92018      3.59648  

Version History

5.6
Introduced

See Also

LA_TRIRED, TRIQL

  IDL Online Help (March 06, 2007)