hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_dsterf (f08jf)

Purpose

nag_lapack_dsterf (f08jf) computes all the eigenvalues of a real symmetric tridiagonal matrix.

Syntax

[d, e, info] = f08jf(d, e, 'n', n)
[d, e, info] = nag_lapack_dsterf(d, e, 'n', n)

Description

nag_lapack_dsterf (f08jf) computes all the eigenvalues of a real symmetric tridiagonal matrix, using a square-root-free variant of the QRQR algorithm.
The function uses an explicit shift, and, like nag_lapack_dsteqr (f08je), switches between the QRQR and QLQL variants in order to handle graded matrices effectively (see Greenbaum and Dongarra (1980)).

References

Greenbaum A and Dongarra J J (1980) Experiments with QR/QL methods for the symmetric triangular eigenproblem LAPACK Working Note No. 17 (Technical Report CS-89-92) University of Tennessee, Knoxville
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia

Parameters

Compulsory Input Parameters

1:     d( : :) – double array
Note: the dimension of the array d must be at least max (1,n)max(1,n).
The diagonal elements of the tridiagonal matrix TT.
2:     e( : :) – double array
Note: the dimension of the array e must be at least max (1,n1)max(1,n-1).
The off-diagonal elements of the tridiagonal matrix TT.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The first dimension of the array d and the second dimension of the array d. (An error is raised if these dimensions are not equal.)
nn, the order of the matrix TT.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     d( : :) – double array
Note: the dimension of the array d must be at least max (1,n)max(1,n).
The nn eigenvalues in ascending order, unless INFO > 0INFO>0 (in which case see Section [Error Indicators and Warnings]).
2:     e( : :) – double array
Note: the dimension of the array e must be at least max (1,n1)max(1,n-1).
3:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: n, 2: d, 3: e, 4: info.
W INFO > 0INFO>0
The algorithm has failed to find all the eigenvalues after a total of 30 × n30×n iterations. If info = iinfo=i, then on exit ii elements of e have not converged to zero.

Accuracy

The computed eigenvalues are exact for a nearby matrix (T + E)(T+E), where
E2 = O(ε) T2 ,
E2 = O(ε) T2 ,
and εε is the machine precision.
If λiλi is an exact eigenvalue and λ̃iλ~i is the corresponding computed value, then
|λ̃iλi| c (n) ε T2 ,
| λ~i - λi | c (n) ε T2 ,
where c(n)c(n) is a modestly increasing function of nn.

Further Comments

The total number of floating point operations is typically about 14n214n2, but depends on how rapidly the algorithm converges. The operations are all performed in scalar mode.
There is no complex analogue of this function.

Example

function nag_lapack_dsterf_example
d = [-6.99;
     7.92;
     2.34;
     0.32];
e = [-0.44;
     -2.63;
     -1.18];
[dOut, eOut, info] = nag_lapack_dsterf(d, e)
 

dOut =

   -7.0037
   -0.4059
    2.0028
    8.9968


eOut =

     0
     0
     0


info =

                    0


function f08jf_example
d = [-6.99;
     7.92;
     2.34;
     0.32];
e = [-0.44;
     -2.63;
     -1.18];
[dOut, eOut, info] = f08jf(d, e)
 

dOut =

   -7.0037
   -0.4059
    2.0028
    8.9968


eOut =

     0
     0
     0


info =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013