NAG Library Routine Document
f07htf (zpbequ) computes a diagonal scaling matrix intended to equilibrate a complex by Hermitian positive definite band matrix , with bandwidth , and reduce its condition number.
|Integer, Intent (In)||:: ||n, kd, ldab|
|Integer, Intent (Out)||:: ||info|
|Real (Kind=nag_wp), Intent (Out)||:: ||s(n), scond, amax|
|Complex (Kind=nag_wp), Intent (In)||:: ||ab(ldab,*)|
|Character (1), Intent (In)||:: ||uplo|C Header Interface
f07htf_ (const char *uplo, const Integer *n, const Integer *kd, const Complex ab, const Integer *ldab, double s, double *scond, double *amax, Integer *info, const Charlen length_uplo)|
The routine may be called by its
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: – 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: – IntegerInput
On entry: , the order of the matrix .
- 3: – IntegerInput
On entry: , the number of superdiagonals of the matrix if , or the number of subdiagonals if .
- 4: – Complex (Kind=nag_wp) arrayInput
the second dimension of the array ab
must be at least
: the upper or lower triangle of the Hermitian 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: – IntegerInput
: the first dimension of the array ab
as declared in the (sub)program from which f07htf (zpbequ)
- 6: – Real (Kind=nag_wp) arrayOutput
contains the diagonal elements of the scaling matrix
- 7: – 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: – Real (Kind=nag_wp)Output
. If amax
is very close to overflow or underflow, the matrix
should be scaled.
- 9: – IntegerOutput
unless the routine detects an error (see Section 6
Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
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.
Parallelism and Performance
f07htf (zpbequ) is not threaded in any implementation.
The real analogue of this routine is f07hff (dpbequ)
This example equilibrates the Hermitian positive definite matrix
Details of the scaling factors and the scaled matrix are output.
Program Text (f07htfe.f90)
Program Data (f07htfe.d)
Program Results (f07htfe.r)