NAG FL Interface
f07gtf computes a diagonal scaling matrix intended to equilibrate a complex by Hermitian positive definite matrix , stored in packed format, and reduce its condition number.
|Integer, Intent (In)
|Integer, Intent (Out)
|Real (Kind=nag_wp), Intent (Out)
||s(n), scond, amax
|Complex (Kind=nag_wp), Intent (In)
|Character (1), Intent (In)
The routine may be called by the names f07gtf, nagf_lapacklin_zppequ or its LAPACK name zppequ.
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
: indicates whether the upper or lower triangular part of
is stored in the array ap
, as follows:
- The upper triangle of is stored.
- The lower triangle of is stored.
On entry: , the order of the matrix .
– Complex (Kind=nag_wp) array
the dimension of the array ap
must be at least
, packed by columns.
- if , the upper triangle of must be stored with element in for ;
- if , the lower triangle of must be stored with element in for .
Only the elements of ap
corresponding to the diagonal elements
– Real (Kind=nag_wp) array
contains the diagonal elements of the scaling matrix
– Real (Kind=nag_wp)
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
– Real (Kind=nag_wp)
. If amax
is very close to overflow or underflow, the matrix
should be scaled.
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
f07gtf is not threaded in any implementation.
The real analogue of this routine is f07gff
This example equilibrates the Hermitian positive definite matrix
Details of the scaling factors and the scaled matrix are output.