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_dpttrf (f07jd)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_lapack_dpttrf (f07jd) computes the modified Cholesky factorization of a real n  by n  symmetric positive definite tridiagonal matrix A .

Syntax

[d, e, info] = f07jd(d, e, 'n', n)
[d, e, info] = nag_lapack_dpttrf(d, e, 'n', n)

Description

nag_lapack_dpttrf (f07jd) factorizes the matrix A  as
A=LDLT ,  
where L  is a unit lower bidiagonal matrix and D  is a diagonal matrix with positive diagonal elements. The factorization may also be regarded as having the form UTDU , where U  is a unit upper bidiagonal matrix.

References

None.

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 matrix 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 matrix A.

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:     d: – double array
The dimension of the array d will be max1,n
Stores 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 will be max1,n-1
Stores the n-1 subdiagonal elements of the lower bidiagonal matrix L. (e can also be regarded as containing the n-1 superdiagonal elements of the upper bidiagonal matrix U.)
3:     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.
   info>0andinfo<n
The leading minor of order _ is not positive definite, the factorization could not be completed.
   info>0andinfo=n
The leading minor of order n is not positive definite, the factorization was completed, but dn0.

Accuracy

The computed factorization satisfies an equation of the form
A+E=LDLT ,  
where
E=OεA  
and ε  is the machine precision.
Following the use of this function, nag_lapack_dpttrs (f07je) can be used to solve systems of equations AX=B , and nag_lapack_dptcon (f07jg) can be used to estimate the condition number of A .

Further Comments

The total number of floating-point operations required to factorize the matrix A  is proportional to n .
The complex analogue of this function is nag_lapack_zpttrf (f07jr).

Example

This example factorizes the symmetric positive definite tridiagonal matrix A  given by
A = 4.0 -2.0 0.0 0.0 0.0 -2.0 10.0 -6.0 0.0 0.0 0.0 -6.0 29.0 15.0 0.0 0.0 0.0 15.0 25.0 8.0 0.0 0.0 0.0 8.0 5.0 .  
function f07jd_example


fprintf('f07jd 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);

disp('Details of factorization');
disp('The diagonal elements of D');
disp(df);
disp('Sub-diagonal elements of the Cholesky factor L');
disp(ef);


f07jd example results

Details of factorization
The diagonal elements of D
     4     9    25    16     1

Sub-diagonal elements of the Cholesky factor L
   -0.5000   -0.6667    0.6000    0.5000


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