F07BFF (DGBEQU) (PDF version)
F07 Chapter Contents
F07 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F07BFF (DGBEQU)

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

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

2  Specification

SUBROUTINE F07BFF ( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, INFO)
INTEGER  M, N, KL, KU, LDAB, INFO
REAL (KIND=nag_wp)  AB(LDAB,*), R(M), C(N), ROWCND, COLCND, AMAX
The routine may be called by its LAPACK name dgbequ.

3  Description

F07BFF (DGBEQU) 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  Parameters

1:     M – INTEGERInput
On entry: m, the number of rows of the matrix A.
Constraint: M0.
2:     N – INTEGERInput
On entry: n, the number of columns of the matrix A.
Constraint: N0.
3:     KL – INTEGERInput
On entry: kl, the number of subdiagonals of the matrix A.
Constraint: KL0.
4:     KU – INTEGERInput
On entry: ku, the number of superdiagonals of the matrix A.
Constraint: KU0.
5:     AB(LDAB,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array AB must be at least max1,N.
On entry: the m by 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
ABku+1+i-jj  for ​max1,j-kuiminm,j+kl.
See Section 8 in F07BAF (DGBSV) for further details.
6:     LDAB – INTEGERInput
On entry: the first dimension of the array AB as declared in the (sub)program from which F07BFF (DGBEQU) is called.
Constraint: LDABKL+KU+1.
7:     R(M) – REAL (KIND=nag_wp) arrayOutput
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) arrayOutput
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 Ri to the largest value of Ri. 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 Ci to the largest value of Ci.
If COLCND0.1, it is not worth scaling by DC.
11:   AMAX – REAL (KIND=nag_wp)Output
On exit: maxaij. If AMAX is very close to overflow or underflow, the matrix A should be scaled.
12:   INFO – INTEGEROutput
On exit: INFO=0 unless the routine detects an error (see Section 6).

6  Error Indicators and Warnings

Errors or warnings detected by the routine:
INFO<0
If INFO=-i, the ith argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
INFO>0 and INFOM
If INFO=i, the ith row of A is exactly zero.
INFO>M
If INFO=i, the i-Mth column of A is exactly zero.

7  Accuracy

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

8  Further Comments

The complex analogue of this routine is F07BTF (ZGBEQU).

9  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.

9.1  Program Text

Program Text (f07bffe.f90)

9.2  Program Data

Program Data (f07bffe.d)

9.3  Program Results

Program Results (f07bffe.r)


F07BFF (DGBEQU) (PDF version)
F07 Chapter Contents
F07 Chapter Introduction
NAG Library Manual

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