NAG CL Interface
f07jgc (dptcon)

Settings help

CL Name Style:


1 Purpose

f07jgc computes the reciprocal condition number of a real n × n symmetric positive definite tridiagonal matrix A , using the LDLT factorization returned by f07jdc.

2 Specification

#include <nag.h>
void  f07jgc (Integer n, const double d[], const double e[], double anorm, double *rcond, NagError *fail)
The function may be called by the names: f07jgc, nag_lapacklin_dptcon or nag_dptcon.

3 Description

f07jgc should be preceded by a call to f07jdc, which computes a modified Cholesky factorization of the matrix A as
A=LDLT ,  
where L is a unit lower bidiagonal matrix and D is a diagonal matrix, with positive diagonal elements. f07jgc then utilizes the factorization to compute A-11 by a direct method, from which the reciprocal of the condition number of A , 1/κ(A) is computed as
1/κ1(A)=1 / (A1A-11) .  
1/κ(A) is returned, rather than κ(A) , since when A is singular κ(A) is infinite.

4 References

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

5 Arguments

1: n Integer Input
On entry: n, the order of the matrix A.
Constraint: n0.
2: d[dim] const double Input
Note: the dimension, dim, of the array d must be at least max(1,n).
On entry: must contain the n diagonal elements of the diagonal matrix D from the LDLT factorization of A.
3: e[dim] const double Input
Note: the dimension, dim, of the array e must be at least max(1,n-1).
On entry: must contain the (n-1) subdiagonal elements of the unit lower bidiagonal matrix L. (e can also be regarded as the superdiagonal of the unit upper bidiagonal matrix U from the UTDU factorization of A.)
4: anorm double Input
On entry: the 1-norm of the original matrix A, which may be computed as shown in Section 10. anorm must be computed either before calling f07jdc or else from a copy of the original matrix A.
Constraint: anorm0.0.
5: rcond double * Output
On exit: the reciprocal condition number, 1/κ1(A)=1/(A1A-11).
6: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INT
On entry, n=value.
Constraint: n0.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_REAL
On entry, anorm=value.
Constraint: anorm0.0.

7 Accuracy

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

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f07jgc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

The condition number estimation requires 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 f07juc.

10 Example

This example computes the condition number of the symmetric positive definite tridiagonal matrix A given by
A = ( 4.0 -2.0 0 0 0 -2.0 10.0 -6.0 0 0 0 -6.0 29.0 15.0 0 0 0 15.0 25.0 8.0 0 0 0 8.0 5.0 ) .  

10.1 Program Text

Program Text (f07jgce.c)

10.2 Program Data

Program Data (f07jgce.d)

10.3 Program Results

Program Results (f07jgce.r)