NAG Library Routine Document
F07HFF (DPBEQU) computes a diagonal scaling matrix intended to equilibrate a real by symmetric positive definite band matrix , with bandwidth , and reduce its condition number.
||N, KD, LDAB, INFO
||AB(LDAB,*), S(N), SCOND, AMAX
The routine may be called by its
F07HFF (DPBEQU) computes a diagonal scaling matrix
chosen so that
This means that the matrix
has diagonal elements equal to unity. This in turn means that the condition number of
, is within a factor
of the matrix of smallest possible condition number over all possible choices of diagonal scalings (see Corollary 7.6 of Higham (2002)
Higham N J (2002) Accuracy and Stability of Numerical Algorithms (2nd Edition) SIAM, Philadelphia
- 1: UPLO – CHARACTER(1)Input
: indicates whether the upper or lower triangular part of
is stored in the array AB
, as follows:
- The upper triangle of is stored.
- The lower triangle of is stored.
- 2: N – INTEGERInput
On entry: , the order of the matrix .
- 3: KD – INTEGERInput
On entry: , the number of superdiagonals of the matrix if , or the number of subdiagonals if .
- 4: AB(LDAB,) – REAL (KIND=nag_wp) arrayInput
the second dimension of the array AB
must be at least
: the upper or lower triangle of the symmetric positive definite band matrix
whose scaling factors are to be computed.
The matrix is stored in rows
, more precisely,
- if , the elements of the upper triangle of within the band must be stored with element in ;
- if , the elements of the lower triangle of within the band must be stored with element in
Only the elements of the array AB
corresponding to the diagonal elements of
are referenced. (Row
- 5: LDAB – INTEGERInput
: the first dimension of the array AB
as declared in the (sub)program from which F07HFF (DPBEQU) is called.
- 6: S(N) – REAL (KIND=nag_wp) arrayOutput
contains the diagonal elements of the scaling matrix
- 7: SCOND – REAL (KIND=nag_wp)Output
contains the ratio of the smallest value of S
to the largest value of S
is neither too large nor too small, it is not worth scaling by
- 8: AMAX – REAL (KIND=nag_wp)Output
. If AMAX
is very close to overflow or underflow, the matrix
should be scaled.
- 9: INFO – INTEGEROutput
unless the routine detects an error (see Section 6
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , the th argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
If , the th diagonal element of is not positive (and hence cannot be positive definite).
The computed scale factors will be close to the exact scale factors.
The complex analogue of this routine is F07HTF (ZPBEQU)
This example equilibrates the symmetric positive definite matrix
Details of the scaling factors and the scaled matrix are output.
9.1 Program Text
Program Text (f07hffe.f90)
9.2 Program Data
Program Data (f07hffe.d)
9.3 Program Results
Program Results (f07hffe.r)