NAG FL Interface
f07bff (dgbequ)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f07bff computes diagonal scaling matrices DR and DC intended to equilibrate a real m × n band matrix A of band width (kl+ku+1) , and reduce its condition number.

2 Specification

Fortran Interface
Subroutine f07bff ( m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
Integer, Intent (In) :: m, n, kl, ku, ldab
Integer, Intent (Out) :: info
Real (Kind=nag_wp), Intent (In) :: ab(ldab,*)
Real (Kind=nag_wp), Intent (Out) :: r(m), c(n), rowcnd, colcnd, amax
C Header Interface
#include <nag.h>
void  f07bff_ (const Integer *m, const Integer *n, const Integer *kl, const Integer *ku, const double ab[], const Integer *ldab, double r[], double c[], double *rowcnd, double *colcnd, double *amax, Integer *info)
The routine may be called by the names f07bff, nagf_lapacklin_dgbequ or its LAPACK name dgbequ.

3 Description

f07bff computes the diagonal scaling matrices. The diagonal scaling matrices are chosen to try to make the elements of largest absolute value in each row and column of the matrix B given by
B = DR A DC  
have absolute value 1 . The diagonal elements of DR and DC are restricted to lie in the safe range (δ,1/δ) , where δ is the value returned by routine x02amf. Use of these scaling factors is not guaranteed to reduce the condition number of A but works well in practice.

4 References

None.

5 Arguments

1: m Integer Input
On entry: m, the number of rows of the matrix A.
Constraint: m0.
2: n Integer Input
On entry: n, the number of columns of the matrix A.
Constraint: n0.
3: kl Integer Input
On entry: kl, the number of subdiagonals of the matrix A.
Constraint: kl0.
4: ku Integer Input
On entry: ku, the number of superdiagonals of the matrix A.
Constraint: ku0.
5: ab(ldab,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array ab must be at least max(1,n).
On entry: the m×n band matrix A whose scaling factors are to be computed.
The matrix is stored in rows 1 to kl+ku+1, more precisely, the element Aij must be stored in
ab(ku+1+i-j,j)  for ​max(1,j-ku)imin(m,j+kl).  
See Section 9 in f07baf for further details.
6: ldab Integer Input
On entry: the first dimension of the array ab as declared in the (sub)program from which f07bff is called.
Constraint: ldabkl+ku+1.
7: r(m) Real (Kind=nag_wp) array Output
On exit: if info=0 or info>m, r contains the row scale factors, the diagonal elements of DR. The elements of r will be positive.
8: c(n) Real (Kind=nag_wp) array Output
On exit: if info=0, c contains the column scale factors, the diagonal elements of DC. The elements of c will be positive.
9: rowcnd Real (Kind=nag_wp) Output
On exit: if info=0 or info>m, rowcnd contains the ratio of the smallest value of r(i) to the largest value of r(i). If rowcnd0.1 and amax is neither too large nor too small, it is not worth scaling by DR.
10: colcnd Real (Kind=nag_wp) Output
On exit: if info=0, colcnd contains the ratio of the smallest value of c(i) to the largest value of c(i).
If colcnd0.1, it is not worth scaling by DC.
11: amax Real (Kind=nag_wp) Output
On exit: max|aij|. If amax is very close to overflow or underflow, the matrix A should be scaled.
12: info Integer Output
On exit: info=0 unless the routine detects an error (see Section 6).

6 Error Indicators and Warnings

info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.
info>0andinfom
Row value of A is exactly zero.
info>m
Column value of A is exactly zero.

7 Accuracy

The computed scale factors will be close to the exact scale factors.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f07bff is not threaded in any implementation.

9 Further Comments

The complex analogue of this routine is f07btf.

10 Example

This example equilibrates the band matrix A given by
A = ( -0.23 2.54 -3.66×10−10 -0 -6.98×1010 2.46×1010 -2.73 -2.13×1010 -0 2.56 -2.46×10−10 -4.07 -0 0 -4.78×10−10 -3.82 ) .  
Details of the scaling factors, and the scaled matrix are output.

10.1 Program Text

Program Text (f07bffe.f90)

10.2 Program Data

Program Data (f07bffe.d)

10.3 Program Results

Program Results (f07bffe.r)