NAG Library Function Document

nag_zgtcon (f07cuc)

 Contents

    1  Purpose
    7  Accuracy

1
Purpose

nag_zgtcon (f07cuc) estimates the reciprocal condition number of a complex n  by n  tridiagonal matrix A , using the LU  factorization returned by nag_zgttrf (f07crc).

2
Specification

#include <nag.h>
#include <nagf07.h>
void  nag_zgtcon (Nag_NormType norm, Integer n, const Complex dl[], const Complex d[], const Complex du[], const Complex du2[], const Integer ipiv[], double anorm, double *rcond, NagError *fail)

3
Description

nag_zgtcon (f07cuc) should be preceded by a call to nag_zgttrf (f07crc), which uses Gaussian elimination with partial pivoting and row interchanges to factorize the matrix A  as
A=PLU ,  
where P  is a permutation matrix, L  is unit lower triangular with at most one nonzero subdiagonal element in each column, and U  is an upper triangular band matrix, with two superdiagonals. nag_zgtcon (f07cuc) then utilizes the factorization to estimate either A-11  or A-1 , from which the estimate of the reciprocal of the condition number of A , 1/κA  is computed as either
1 / κ1 A = 1 / A1 A-11  
or
1 / κ A = 1 / A A-1 .  
1/κA  is returned, rather than κA , since when A  is singular κA  is infinite.
Note that κA=κ1AT .

4
References

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

5
Arguments

1:     norm Nag_NormTypeInput
On entry: specifies the norm to be used to estimate κA.
norm=Nag_OneNorm
Estimate κ1A.
norm=Nag_InfNorm
Estimate κA.
Constraint: norm=Nag_OneNorm or Nag_InfNorm.
2:     n IntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
3:     dl[dim] const ComplexInput
Note: the dimension, dim, of the array dl must be at least max1,n-1.
On entry: must contain the n-1 multipliers that define the matrix L of the LU factorization of A.
4:     d[dim] const ComplexInput
Note: the dimension, dim, of the array d must be at least max1,n.
On entry: must contain the n diagonal elements of the upper triangular matrix U from the LU factorization of A.
5:     du[dim] const ComplexInput
Note: the dimension, dim, of the array du must be at least max1,n-1.
On entry: must contain the n-1 elements of the first superdiagonal of U.
6:     du2[dim] const ComplexInput
Note: the dimension, dim, of the array du2 must be at least max1,n-2.
On entry: must contain the n-2 elements of the second superdiagonal of U.
7:     ipiv[dim] const IntegerInput
Note: the dimension, dim, of the array ipiv must be at least max1,n.
On entry: must contain the n pivot indices that define the permutation matrix P. At the ith step, row i of the matrix was interchanged with row ipiv[i-1], and ipiv[i-1] must always be either i or i+1, ipiv[i-1]=i indicating that a row interchange was not performed.
8:     anorm doubleInput
On entry: if norm=Nag_OneNorm, the 1-norm of the original matrix A.
If norm=Nag_InfNorm, the -norm of the original matrix A.
anorm may be computed as demonstrated in Section 10 for the 1-norm. The -norm may be similarly computed by swapping the dl and du arrays in the code for the 1-norm.
anorm must be computed either before calling nag_zgttrf (f07crc) or else from a copy of the original matrix A (see Section 10).
Constraint: anorm0.0.
9:     rcond double *Output
On exit: contains an estimate of the reciprocal condition number.
10:   fail NagError *Input/Output
The NAG error argument (see Section 3.7 in How to Use the NAG Library and its Documentation).

6
Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 2.3.1.2 in How to Use the NAG Library and its Documentation 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 2.7.6 in How to Use the NAG Library and its Documentation for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.
NE_REAL
On entry, anorm=value.
Constraint: anorm0.0.

7
Accuracy

In practice the condition number estimator is very reliable, but it can underestimate the true condition number; see Section 15.3 of Higham (2002) for further details.

8
Parallelism and Performance

nag_zgtcon (f07cuc) 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 typically requires between four and five solves and never more than eleven solves, following the factorization. The total number of floating-point operations required to perform a solve is proportional to n .
The real analogue of this function is nag_dgtcon (f07cgc).

10
Example

This example estimates the condition number in the 1-norm of the tridiagonal matrix A  given by
A = -1.3+1.3i 2.0-1.0i 0.0i+0.0 0.0i+0.0 0.0i+0.0 1.0-2.0i -1.3+1.3i 2.0+1.0i 0.0i+0.0 0.0i+0.0 0.0i+0.0 1.0+1.0i -1.3+3.3i -1.0+1.0i 0.0i+0.0 0.0i+0.0 0.0i+0.0 2.0-3.0i -0.3+4.3i 1.0-1.0i 0.0i+0.0 0.0i+0.0 0.0i+0.0 1.0+1.0i -3.3+1.3i .  

10.1
Program Text

Program Text (f07cuce.c)

10.2
Program Data

Program Data (f07cuce.d)

10.3
Program Results

Program Results (f07cuce.r)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017