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_dptcon (f07jg)

Purpose

nag_lapack_dptcon (f07jg) computes the reciprocal condition number of a real n n  by n n  symmetric positive definite tridiagonal matrix A A , using the LDLT LDLT  factorization returned by nag_lapack_dpttrf (f07jd).

Syntax

[rcond, info] = f07jg(d, e, anorm, 'n', n)
[rcond, info] = nag_lapack_dptcon(d, e, anorm, 'n', n)

Description

nag_lapack_dptcon (f07jg) should be preceded by a call to nag_lapack_dpttrf (f07jd), which computes a modified Cholesky factorization of 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. nag_lapack_dptcon (f07jg) then utilizes the factorization to compute A11 A-11  by a direct method, from which the reciprocal of the condition number of A A , 1 / κ(A) 1/κ(A)  is computed as
1 / κ1(A) = 1 / (A1A11) .
1/κ1(A)=1 / ( A1 A-11 ) .
1 / κ(A) 1/κ(A)  is returned, rather than κ(A) κ(A) , since when A A  is singular κ(A) κ(A)  is infinite.

References

Higham N J (2002) Accuracy and Stability of Numerical Algorithms (2nd Edition) SIAM, Philadelphia

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 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).
Must contain the (n1)(n-1) subdiagonal elements of the unit lower bidiagonal matrix LL. (e can also be regarded as the superdiagonal of the unit upper bidiagonal matrix UU from the UTDUUTDU factorization of AA.)
3:     anorm – double scalar
The 11-norm of the original matrix AA, which may be computed by calling nag_blas_dlanst (f06rp) with its parameter norm = '1'norm='1'. anorm must be computed either before calling nag_lapack_dpttrf (f07jd) or else from a copy of the original matrix AA.
Constraint: anorm0.0anorm0.0.

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

work

Output Parameters

1:     rcond – double scalar
The reciprocal condition number, 1 / κ1(A) = 1 / (A1A11)1/κ1(A)=1/(A1A-11).
2:     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: anorm, 5: rcond, 6: work, 7: info.
It is possible that info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.

Accuracy

The computed condition number will be the exact condition number for a closely neighbouring matrix.

Further Comments

The condition number estimation requires O(n) O(n)  floating point operations.
See Section 15.6 of Higham (2002) for further details on computing the condition number of tridiagonal matrices.
The complex analogue of this function is nag_lapack_zptcon (f07ju).

Example

function nag_lapack_dptcon_example
d = [4;
     9;
     25;
     16;
     1];
e = [-0.5;
     -0.6666666666666666;
     0.6;
     0.5];
anorm = 50;
[rcond, info] = nag_lapack_dptcon(d, e, anorm)
 

rcond =

    0.0095


info =

                    0


function f07jg_example
d = [4;
     9;
     25;
     16;
     1];
e = [-0.5;
     -0.6666666666666666;
     0.6;
     0.5];
anorm = 50;
[rcond, info] = f07jg(d, e, anorm)
 

rcond =

    0.0095


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