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_zpttrf (f07jr)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_lapack_zpttrf (f07jr) computes the modified Cholesky factorization of a complex n  by n  Hermitian positive definite tridiagonal matrix A .

Syntax

[d, e, info] = f07jr(d, e, 'n', n)
[d, e, info] = nag_lapack_zpttrf(d, e, 'n', n)

Description

nag_lapack_zpttrf (f07jr) factorizes the matrix A  as
A=LDLH ,  
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 UHDU , 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: – complex 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 LDLH factorization of A.
2:     e: – complex 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=LDLH ,  
where
E=OεA  
and ε  is the machine precision.
Following the use of this function, nag_lapack_zpttrs (f07js) can be used to solve systems of equations AX=B , and nag_lapack_zptcon (f07ju) 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 real analogue of this function is nag_lapack_dpttrf (f07jd).

Example

This example factorizes the Hermitian positive definite tridiagonal matrix A  given by
A = 16.0i+00.0 16.0-16.0i 0.0i+0.0 0.0i+0.0 16.0+16.0i 41.0i+00.0 18.0+9.0i 0.0i+0.0 0.0i+00.0 18.0-09.0i 46.0i+0.0 1.0+4.0i 0.0i+00.0 0.0i+00.0 1.0-4.0i 21.0i+0.0 .  
function f07jr_example


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

% Hermitian tridiagonal A stored as two diagonals
d = [ 16            41          46            21];
e = [ 16 + 16i      18 - 9i      1 - 4i         ];

% Factorize
[df, ef, info] = f07jr( ...
                        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);


f07jr example results

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

Sub-diagonal elements of the Cholesky factor L
   1.0000 + 1.0000i   2.0000 - 1.0000i   1.0000 - 4.0000i


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