NAG Library Routine Document
f07fff (dpoequ) computes a diagonal scaling matrix intended to equilibrate a real by symmetric positive definite matrix and reduce its condition number.
|Integer, Intent (In)||:: ||n, lda|
|Integer, Intent (Out)||:: ||info|
|Real (Kind=nag_wp), Intent (In)||:: ||a(lda,*)|
|Real (Kind=nag_wp), Intent (Out)||:: ||s(n), scond, amax|C Header Interface
f07fff_ (const Integer *n, const double a, const Integer *lda, double s, double *scond, double *amax, Integer *info)|
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: – IntegerInput
On entry: , the order of the matrix .
- 2: – Real (Kind=nag_wp) arrayInput
the second dimension of the array a
must be at least
: the matrix
whose scaling factors are to be computed. Only the diagonal elements of the array a
- 3: – IntegerInput
: the first dimension of the array a
as declared in the (sub)program from which f07fff (dpoequ)
- 4: – Real (Kind=nag_wp) arrayOutput
contains the diagonal elements of the scaling matrix
- 5: – 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
- 6: – Real (Kind=nag_wp)Output
. If amax
is very close to overflow or underflow, the matrix
should be scaled.
- 7: – 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
f07fff (dpoequ) is not threaded in any implementation.
The complex analogue of this routine is f07ftf (zpoequ)
This example equilibrates the symmetric positive definite matrix
Details of the scaling factors and the scaled matrix are output.
Program Text (f07fffe.f90)
Program Data (f07fffe.d)
Program Results (f07fffe.r)