NAG C Library Function Document

nag_superlu_matrix_norm (f11mlc)

1
Purpose

nag_superlu_matrix_norm (f11mlc) computes the 1-norm, the -norm or the maximum absolute value of the elements of a real, square, sparse matrix which is held in compressed column (Harwell–Boeing) format.

2
Specification

#include <nag.h>
#include <nagf11.h>
void  nag_superlu_matrix_norm (Nag_NormType norm, double *anorm, Integer n, const Integer icolzp[], const Integer irowix[], const double a[], NagError *fail)

3
Description

nag_superlu_matrix_norm (f11mlc) computes various quantities relating to norms of a real, sparse n by n matrix A presented in compressed column (Harwell–Boeing) format.

4
References

None.

5
Arguments

1:     norm Nag_NormTypeInput
On entry: specifies the value to be returned in anorm.
norm=Nag_RealOneNorm
The 1-norm A1 of the matrix is computed, that is max1jni=1nAij.
norm=Nag_RealInfNorm
The -norm A of the matrix is computed, that is max1in j=1n Aij.
norm=Nag_RealMaxNorm
The value max1i,jnAij  (not a norm).
Constraint: norm=Nag_RealOneNorm, Nag_RealInfNorm or Nag_RealMaxNorm.
2:     anorm double *Output
On exit: the computed quantity relating the matrix.
3:     n IntegerInput
On entry: n, the order of the matrix A.
Constraint: n0.
4:     icolzp[dim] const IntegerInput
Note: the dimension, dim, of the array icolzp must be at least n+1.
On entry: icolzp[i-1] contains the index in A of the start of a new column. See Section 2.1.3 in the f11 Chapter Introduction.
5:     irowix[dim] const IntegerInput
Note: the dimension, dim, of the array irowix must be at least icolzp[n]-1, the number of nonzeros of the sparse matrix A.
On entry: the row index array of sparse matrix A.
6:     a[dim] const doubleInput
Note: the dimension, dim, of the array a must be at least icolzp[n]-1, the number of nonzeros of the sparse matrix A.
On entry: the array of nonzero values in the sparse matrix A.
7:     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.

7
Accuracy

Not applicable.

8
Parallelism and Performance

nag_superlu_matrix_norm (f11mlc) 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

None.

10
Example

This example computes norms and maximum absolute value 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 .  

10.1
Program Text

Program Text (f11mlce.c)

10.2
Program Data

Program Data (f11mlce.d)

10.3
Program Results

Program Results (f11mlce.r)