nag_superlu_condition_number_lu (f11mgc) (PDF version)
f11 Chapter Contents
f11 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_superlu_condition_number_lu (f11mgc)

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_superlu_condition_number_lu (f11mgc) computes an estimate of the reciprocal of the condition number of a sparse matrix given an LU  factorization of the matrix computed by nag_superlu_lu_factorize (f11mec).

2  Specification

#include <nag.h>
#include <nagf11.h>
void  nag_superlu_condition_number_lu (Nag_NormType norm, Integer n, const Integer il[], const double lval[], const Integer iu[], const double uval[], double anorm, double *rcond, NagError *fail)

3  Description

nag_superlu_condition_number_lu (f11mgc) estimates the condition number of a real sparse matrix A, in either the 1-norm or the -norm:
κ1A=A1 A-11   or   κA=A A-1.  
Note that κA=κ1AT.
Because the condition number is infinite if A is singular, the function actually returns an estimate of the reciprocal of the condition number.
The function should be preceded by a call to nag_superlu_matrix_norm (f11mlc) to compute A1 or A, and a call to nag_superlu_lu_factorize (f11mec) to compute the LU  factorization of A. The function then estimates A-11 or A-1 and computes the reciprocal of the condition number.

4  References

None.

5  Arguments

1:     norm Nag_NormTypeInput
On entry: indicates whether κ1A or κA is to be estimated.
norm=Nag_RealOneNorm
κ1A is estimated.
norm=Nag_RealInfNorm
κA is estimated.
Constraint: norm=Nag_RealOneNorm or Nag_RealInfNorm.
2:     n IntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
3:     il[dim] const IntegerInput
Note: the dimension, dim, of the array il must be at least as large as the dimension of the array of the same name in nag_superlu_lu_factorize (f11mec).
On entry: records the sparsity pattern of matrix L as computed by nag_superlu_lu_factorize (f11mec).
4:     lval[dim] const doubleInput
Note: the dimension, dim, of the array lval must be at least as large as the dimension of the array of the same name in nag_superlu_lu_factorize (f11mec).
On entry: records the nonzero values of matrix L and some nonzero values of matrix U as computed by nag_superlu_lu_factorize (f11mec).
5:     iu[dim] const IntegerInput
Note: the dimension, dim, of the array iu must be at least as large as the dimension of the array of the same name in nag_superlu_lu_factorize (f11mec).
On entry: records the sparsity pattern of matrix U as computed by nag_superlu_lu_factorize (f11mec).
6:     uval[dim] const doubleInput
Note: the dimension, dim, of the array uval must be at least as large as the dimension of the array of the same name in nag_superlu_lu_factorize (f11mec).
On entry: records some nonzero values of matrix U as computed by nag_superlu_lu_factorize (f11mec).
7:     anorm doubleInput
On entry: if norm=Nag_RealOneNorm, the 1-norm of the matrix A.
If norm=Nag_RealInfNorm, the -norm of the matrix A.
anorm may be computed by calling nag_superlu_matrix_norm (f11mlc) with the same value for the argument norm.
Constraint: anorm0.0.
8:     rcond double *Output
On exit: an estimate of the reciprocal of the condition number of A. rcond is set to zero if exact singularity is detected or the estimate underflows. If rcond is less than machine precision, A is singular to working precision.
9:     fail NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.2.1.2 in the Essential Introduction 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.
An unexpected error has been triggered by this function. Please contact NAG.
See Section 3.6.6 in the Essential Introduction for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 3.6.5 in the Essential Introduction for further information.
NE_REAL
On entry, anorm=value.
Constraint: anorm0.0.

7  Accuracy

The computed estimate rcond is never less than the true value ρ, and in practice is nearly always less than 10ρ, although examples can be constructed where rcond is much larger.

8  Parallelism and Performance

nag_superlu_condition_number_lu (f11mgc) is not threaded by NAG in any implementation.
nag_superlu_condition_number_lu (f11mgc) 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

A call to nag_superlu_condition_number_lu (f11mgc) involves solving a number of systems of linear equations of the form Ax=b or ATx=b.

10  Example

This example estimates the condition number in the 1-norm of the matrix A, where
A= 2.00 1.00 0 0 0 0 0 1.00 -1.00 0 4.00 0 1.00 0 1.00 0 0 0 1.00 2.00 0 -2.00 0 0 3.00 .  
Here A is nonsymmetric and must first be factorized by nag_superlu_lu_factorize (f11mec). The true condition number in the 1-norm is 20.25.

10.1  Program Text

Program Text (f11mgce.c)

10.2  Program Data

Program Data (f11mgce.d)

10.3  Program Results

Program Results (f11mgce.r)


nag_superlu_condition_number_lu (f11mgc) (PDF version)
f11 Chapter Contents
f11 Chapter Introduction
NAG Library Manual

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