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)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

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 QR algorithm.
The function uses an explicit shift, and, like nag_lapack_dsteqr (f08je), switches between the QR and QL 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 http://www.netlib.org/lapack/lawnspdf/lawn17.pdf
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia

Parameters

Compulsory Input Parameters

1:     d: – double array
The dimension of the array d must be at least max1,n
The diagonal elements of the tridiagonal matrix T.
2:     e: – double array
The dimension of the array e must be at least max1,n-1
The off-diagonal elements of the tridiagonal matrix T.

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.)
n, the order of the matrix T.
Constraint: n0.

Output Parameters

1:     d: – double array
The dimension of the array d will be max1,n
The n eigenvalues in ascending order, unless info>0 (in which case see Error Indicators and Warnings).
2:     e: – double array
The dimension of the array e will be max1,n-1
3:     info int64int32nag_int scalar
info=0 unless the function detects an error (see 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=-i
If info=-i, parameter i had an illegal value on entry. The parameters are numbered as follows:
1: n, 2: d, 3: e, 4: info.
W  info>0
The algorithm has failed to find all the eigenvalues after a total of 30×n iterations. If info=i, then on exit i elements of e have not converged to zero.

Accuracy

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

Further Comments

The total number of floating-point operations is typically about 14n2, 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

This example computes all the eigenvalues of the symmetric tridiagonal matrix T, where
T = -6.99 -0.44 0.00 0.00 -0.44 7.92 -2.63 0.00 0.00 -2.63 2.34 -1.18 0.00 0.00 -1.18 0.32 .  
function f08jf_example


fprintf('f08jf example results\n\n');

% Symmetric tridiagonal A stored as diagonal and off-diagonal
n = 4;
d = [-6.99;     7.92;     2.34;     0.32];
e = [-0.44;    -2.63;    -1.18];

% Eigenvalues only of A
[w, ~, info] = f08jf( ...
                      d, e);

disp('Eigenvalues');
disp(w');


f08jf example results

Eigenvalues
   -7.0037   -0.4059    2.0028    8.9968


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–2015