F11MGF (PDF version)
F11 Chapter Contents
F11 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F11MGF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

F11MGF computes an estimate of the reciprocal of the condition number of a sparse matrix given an LU  factorization of the matrix computed by F11MEF.

2  Specification

SUBROUTINE F11MGF ( NORM, N, IL, LVAL, IU, UVAL, ANORM, RCOND, IFAIL)
INTEGER  N, IL(*), IU(*), IFAIL
REAL (KIND=nag_wp)  LVAL(*), UVAL(*), ANORM, RCOND
CHARACTER(1)  NORM

3  Description

F11MGF 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 routine actually returns an estimate of the reciprocal of the condition number.
The routine should be preceded by a call to F11MLF to compute A1 or A, and a call to F11MEF to compute the LU  factorization of A. The routine then estimates A-11 or A-1 and computes the reciprocal of the condition number.

4  References

None.

5  Parameters

1:     NORM – CHARACTER(1)Input
On entry: indicates whether κ1A or κA is to be estimated.
NORM='1' or 'O'
κ1A is estimated.
NORM='I'
κA is estimated.
Constraint: NORM='1', 'O' or 'I'.
2:     N – INTEGERInput
On entry: n, the order of the matrix A.
Constraint: N0.
3:     IL(*) – INTEGER arrayInput
Note: the dimension of the array IL must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records the sparsity pattern of matrix L as computed by F11MEF.
4:     LVAL(*) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array LVAL must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records the nonzero values of matrix L and some nonzero values of matrix U as computed by F11MEF.
5:     IU(*) – INTEGER arrayInput
Note: the dimension of the array IU must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records the sparsity pattern of matrix U as computed by F11MEF.
6:     UVAL(*) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array UVAL must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records some nonzero values of matrix U as computed by F11MEF.
7:     ANORM – REAL (KIND=nag_wp)Input
On entry: if NORM='1' or 'O', the 1-norm of the matrix A.
If NORM='I', the -norm of the matrix A.
ANORM may be computed by calling F11MLF with the same value for the parameter NORM.
Constraint: ANORM0.0.
8:     RCOND – REAL (KIND=nag_wp)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:     IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
IFAIL=1
On entry,NORM'1', 'O' or 'I',
orN<0,
orANORM<0.0.
IFAIL=301
Unable to allocate required internal workspace.

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  Further Comments

A call to F11MGF involves solving a number of systems of linear equations of the form Ax=b or ATx=b.

9  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 F11MEF. The true condition number in the 1-norm is 20.25.

9.1  Program Text

Program Text (f11mgfe.f90)

9.2  Program Data

Program Data (f11mgfe.d)

9.3  Program Results

Program Results (f11mgfe.r)


F11MGF (PDF version)
F11 Chapter Contents
F11 Chapter Introduction
NAG Library Manual

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