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)

Purpose

nag_lapack_zpttrf (f07jr) computes the modified Cholesky factorization of a complex n n  by n n  Hermitian positive definite tridiagonal matrix A 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 A  as
A = LDLH ,
A=LDLH ,
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 UHDU UHDU , 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( : :) – complex 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 LDLHLDLH factorization of AA.
2:     e( : :) – complex 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 = LDLH ,
A+E=LDLH ,
where
E = O(ε)A
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 AX=B , and nag_lapack_zptcon (f07ju) 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 real analogue of this function is nag_lapack_dpttrf (f07jd).

Example

function nag_lapack_zpttrf_example
d = [16;
     41;
     46;
     21];
e = [ 16 + 16i;
      18 - 9i;
      1 - 4i];
[dOut, eOut, info] = nag_lapack_zpttrf(d, e)
 

dOut =

    16
     9
     1
     4


eOut =

   1.0000 + 1.0000i
   2.0000 - 1.0000i
   1.0000 - 4.0000i


info =

                    0


function f07jr_example
d = [16;
     41;
     46;
     21];
e = [ 16 + 16i;
      18 - 9i;
      1 - 4i];
[dOut, eOut, info] = f07jr(d, e)
 

dOut =

    16
     9
     1
     4


eOut =

   1.0000 + 1.0000i
   2.0000 - 1.0000i
   1.0000 - 4.0000i


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