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_dptcon (f07jg)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_lapack_dptcon (f07jg) computes the reciprocal condition number of a real n  by n  symmetric positive definite tridiagonal matrix A , using the LDLT  factorization returned by nag_lapack_dpttrf (f07jd).

Syntax

[rcond, info] = f07jg(d, e, anorm, 'n', n)
[rcond, info] = nag_lapack_dptcon(d, e, anorm, 'n', n)

Description

nag_lapack_dptcon (f07jg) should be preceded by a call to nag_lapack_dpttrf (f07jd), which computes a modified Cholesky factorization of the matrix A  as
A=LDLT ,  
where L  is a unit lower bidiagonal matrix and D  is a diagonal matrix, with positive diagonal elements. nag_lapack_dptcon (f07jg) then utilizes the factorization to compute A-11  by a direct method, from which the reciprocal of the condition number of A , 1/κA  is computed as
1/κ1A=1 / A1 A-11 .  
1/κA  is returned, rather than κA , since when A  is singular κA  is infinite.

References

Higham N J (2002) Accuracy and Stability of Numerical Algorithms (2nd Edition) SIAM, Philadelphia

Parameters

Compulsory Input Parameters

1:     d: – double array
The dimension of the array d must be at least max1,n
Must contain the n diagonal elements of the diagonal matrix D from the LDLT factorization of A.
2:     e: – double array
The dimension of the array e must be at least max1,n-1
Must contain the n-1 subdiagonal elements of the unit lower bidiagonal matrix L. (e can also be regarded as the superdiagonal of the unit upper bidiagonal matrix U from the UTDU factorization of A.)
3:     anorm – double scalar
The 1-norm of the original matrix A. anorm must be computed either before calling nag_lapack_dpttrf (f07jd) or else from a copy of the original matrix A.
Constraint: anorm0.0.

Optional Input Parameters

1:     n int64int32nag_int scalar
Default: the dimension of the array d.
n, the order of the matrix A.
Constraint: n0.

Output Parameters

1:     rcond – double scalar
The reciprocal condition number, 1/κ1A=1/A1A-11.
2:     info int64int32nag_int scalar
info=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

   info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

Accuracy

The computed condition number will be the exact condition number for a closely neighbouring matrix.

Further Comments

The condition number estimation requires On  floating-point operations.
See Section 15.6 of Higham (2002) for further details on computing the condition number of tridiagonal matrices.
The complex analogue of this function is nag_lapack_zptcon (f07ju).

Example

This example computes the condition number of the symmetric positive definite tridiagonal matrix A  given by
A = 4.0 -2.0 0 0 0 -2.0 10.0 -6.0 0 0 0 -6.0 29.0 15.0 0 0 0 15.0 25.0 8.0 0 0 0 8.0 5.0 .  
function f07jg_example


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

% Symmetric tridiagonal A stored as two diagonals
d = [ 4     10     29     25     5];
e = [-2     -6     15     8       ];

[df, ef, info] = f07jd( ...
                        d, e);

% Construct matrix an with same 1-norm
an = [0 e; d; e 0];
anorm = norm(an,1);

% Get reciprocal condition number
[rcond, info] = f07jg( ...
                       df, ef, anorm);

fprintf('Condition number of A = %7.2e\n',1/rcond);


f07jg example results

Condition number of A = 1.05e+02

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