nag_dpttrf (f07jdc) (PDF version)
f07 Chapter Contents
f07 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_dpttrf (f07jdc)

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

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

2  Specification

#include <nag.h>
#include <nagf07.h>
void  nag_dpttrf (Integer n, double d[], double e[], NagError *fail)

3  Description

nag_dpttrf (f07jdc) 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.

4  References

None.

5  Arguments

1:     nIntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
2:     d[dim]doubleInput/Output
Note: the dimension, dim, of the array d must be at least max1,n.
On entry: must contain the n diagonal elements of the matrix A.
On exit: is overwritten by the n diagonal elements of the diagonal matrix D from the LDLT factorization of A.
3:     e[dim]doubleInput/Output
Note: the dimension, dim, of the array e must be at least max1,n-1.
On entry: must contain the n-1 subdiagonal elements of the matrix A.
On exit: is overwritten by 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.)
4:     failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INT
On entry, n=value.
Constraint: n0.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
NE_MAT_NOT_POS_DEF
The leading minor of order n is not positive definite, the factorization was completed, but d[n-1]0.
The leading minor of order value is not positive definite, the factorization could not be completed.

7  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_dpttrs (f07jec) can be used to solve systems of equations AX=B , and nag_dptcon (f07jgc) can be used to estimate the condition number of A .

8  Parallelism and Performance

Not applicable.

9  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_zpttrf (f07jrc).

10  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 .

10.1  Program Text

Program Text (f07jdce.c)

10.2  Program Data

Program Data (f07jdce.d)

10.3  Program Results

Program Results (f07jdce.r)


nag_dpttrf (f07jdc) (PDF version)
f07 Chapter Contents
f07 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2014