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_zpptri (f07gw)

Purpose

nag_lapack_zpptri (f07gw) computes the inverse of a complex Hermitian positive definite matrix AA, where AA has been factorized by nag_lapack_zpptrf (f07gr), using packed storage.

Syntax

[ap, info] = f07gw(uplo, n, ap)
[ap, info] = nag_lapack_zpptri(uplo, n, ap)

Description

nag_lapack_zpptri (f07gw) is used to compute the inverse of a complex Hermitian positive definite matrix AA, the function must be preceded by a call to nag_lapack_zpptrf (f07gr), which computes the Cholesky factorization of AA, using packed storage.
If uplo = 'U'uplo='U', A = UHUA=UHU and A1A-1 is computed by first inverting UU and then forming (U1)UH(U-1)U-H.
If uplo = 'L'uplo='L', A = LLHA=LLH and A1A-1 is computed by first inverting LL and then forming LH(L1)L-H(L-1).

References

Du Croz J J and Higham N J (1992) Stability of methods for matrix inversion IMA J. Numer. Anal. 12 1–19

Parameters

Compulsory Input Parameters

1:     uplo – string (length ≥ 1)
Specifies how AA has been factorized.
uplo = 'U'uplo='U'
A = UHUA=UHU, where UU is upper triangular.
uplo = 'L'uplo='L'
A = LLHA=LLH, where LL is lower triangular.
Constraint: uplo = 'U'uplo='U' or 'L''L'.
2:     n – int64int32nag_int scalar
nn, the order of the matrix AA.
Constraint: n0n0.
3:     ap( : :) – complex array
Note: the dimension of the array ap must be at least max (1,n × (n + 1) / 2)max(1,n×(n+1)/2).
The Cholesky factor of AA stored in packed form, as returned by nag_lapack_zpptrf (f07gr).

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     ap( : :) – complex array
Note: the dimension of the array ap must be at least max (1,n × (n + 1) / 2)max(1,n×(n+1)/2).
The factorization stores the nn by nn matrix A1A-1.
More precisely,
  • if uplo = 'U'uplo='U', the upper triangle of A1A-1 must be stored with element AijAij in ap(i + j(j1) / 2)api+j(j-1)/2 for ijij;
  • if uplo = 'L'uplo='L', the lower triangle of A1A-1 must be stored with element AijAij in ap(i + (2nj)(j1) / 2)api+(2n-j)(j-1)/2 for ijij.
2:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: uplo, 2: n, 3: ap, 4: info.
W INFO > 0INFO>0
If info = iinfo=i, the iith diagonal element of the Cholesky factor is zero; the Cholesky factor is singular and the inverse of AA cannot be computed.

Accuracy

The computed inverse XX satisfies
XAI2c(n)εκ2(A)   and   AXI2c(n)εκ2(A) ,
XA-I2c(n)εκ2(A)   and   AX-I2c(n)εκ2(A) ,
where c(n)c(n) is a modest function of nn, εε is the machine precision and κ2(A)κ2(A) is the condition number of AA defined by
κ2(A) = A2A12 .
κ2(A)=A2A-12 .

Further Comments

The total number of real floating point operations is approximately (8/3)n383n3.
The real analogue of this function is nag_lapack_dpptri (f07gj).

Example

function nag_lapack_zpptri_example
uplo = 'L';
n = int64(4);
ap = [1.797220075561143;
      0.8401864749527325 + 1.068316577423342i;
      1.057188279741849 - 0.467388502622712i;
      0.233694251311356 - 1.391037210186643i;
      1.316353439509685 + 0i;
      -0.4701749470106329 + 0.3130658155999466i;
      0.08335250923944192 + 0.03676071443037458i;
      1.560392977137124 + 0i;
      0.9359617337923402 + 0.9899692192815736i;
      0.6603332973655893 + 0i];
[apOut, info] = nag_lapack_zpptri(uplo, n, ap)
 

apOut =

   5.4691 + 0.0000i
  -1.2624 - 1.5491i
  -2.9746 - 0.9616i
   1.1962 + 2.9772i
   1.1024 + 0.0000i
   0.8989 - 0.5672i
  -0.9826 - 0.2566i
   2.1589 + 0.0000i
  -1.3756 - 1.4550i
   2.2934 + 0.0000i


info =

                    0


function f07gw_example
uplo = 'L';
n = int64(4);
ap = [1.797220075561143;
      0.8401864749527325 + 1.068316577423342i;
      1.057188279741849 - 0.467388502622712i;
      0.233694251311356 - 1.391037210186643i;
      1.316353439509685 + 0i;
      -0.4701749470106329 + 0.3130658155999466i;
      0.08335250923944192 + 0.03676071443037458i;
      1.560392977137124 + 0i;
      0.9359617337923402 + 0.9899692192815736i;
      0.6603332973655893 + 0i];
[apOut, info] = f07gw(uplo, n, ap)
 

apOut =

   5.4691 + 0.0000i
  -1.2624 - 1.5491i
  -2.9746 - 0.9616i
   1.1962 + 2.9772i
   1.1024 + 0.0000i
   0.8989 - 0.5672i
  -0.9826 - 0.2566i
   2.1589 + 0.0000i
  -1.3756 - 1.4550i
   2.2934 + 0.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