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)

Purpose

nag_lapack_dpttrf (f07jd) computes the modified Cholesky factorization of a real n n  by n n  symmetric positive definite tridiagonal matrix A 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 A  as
A = LDLT ,
A=LDLT ,
where L L  is a unit lower bidiagonal matrix and D D  is a diagonal matrix with positive diagonal elements. The factorization may also be regarded as having the form UTDU UTDU , where U U  is a unit upper bidiagonal matrix.

References

None.

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).
Must contain the nn diagonal elements of the matrix AA.
2:     e( : :) – double array
Note: the dimension of the array e must be at least max (1,n1)max(1,n-1).
Must contain the (n1)(n-1) subdiagonal elements of the matrix AA.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The dimension of the array d.
nn, the order of the matrix AA.
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).
Stores the nn diagonal elements of the diagonal matrix DD from the LDLTLDLT factorization of AA.
2:     e( : :) – double array
Note: the dimension of the array e must be at least max (1,n1)max(1,n-1).
Stores the (n1)(n-1) subdiagonal elements of the lower bidiagonal matrix LL. (e can also be regarded as containing the (n1)(n-1) superdiagonal elements of the upper bidiagonal matrix UU.)
3:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and 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.
  INFO > 0INFO>0
If info = iinfo=i, the leading minor of order ii is not positive definite. If i < ni<n, the factorization could not be completed, while if i = ni=n, the factorization was completed, but d(n)0dn0.

Accuracy

The computed factorization satisfies an equation of the form
A + E = LDLT ,
A+E=LDLT ,
where
E = O(ε)A
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 AX=B , and nag_lapack_dptcon (f07jg) can be used to estimate the condition number of A A .

Further Comments

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

Example

function nag_lapack_dpttrf_example
d = [4;
     10;
     29;
     25;
     5];
e = [-2;
     -6;
     15;
     8];
[dOut, eOut, info] = nag_lapack_dpttrf(d, e)
 

dOut =

     4
     9
    25
    16
     1


eOut =

   -0.5000
   -0.6667
    0.6000
    0.5000


info =

                    0


function f07jd_example
d = [4;
     10;
     29;
     25;
     5];
e = [-2;
     -6;
     15;
     8];
[dOut, eOut, info] = f07jd(d, e)
 

dOut =

     4
     9
    25
    16
     1


eOut =

   -0.5000
   -0.6667
    0.6000
    0.5000


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