naginterfaces.library.lapacklin.dpoequ

naginterfaces.library.lapacklin.dpoequ(n, a)[source]

dpoequ computes a diagonal scaling matrix intended to equilibrate a real symmetric positive definite matrix and reduce its condition number.

For full information please refer to the NAG Library document for f07ff

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f07/f07fff.html

Parameters
nint

, the order of the matrix .

afloat, array-like, shape

The matrix whose scaling factors are to be computed. Only the diagonal elements of the array are referenced.

Returns
sfloat, ndarray, shape

If no exception or warning is raised, contains the diagonal elements of the scaling matrix .

scondfloat

If no exception or warning is raised, contains the ratio of the smallest value of to the largest value of . If and is neither too large nor too small, it is not worth scaling by .

amaxfloat

. If is very close to overflow or underflow, the matrix should be scaled.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: .

(errno )

The th diagonal element of is not positive (and hence cannot be positive definite).

Notes

dpoequ computes a diagonal scaling matrix chosen so that

This means that the matrix given by

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

References

Higham, N J, 2002, Accuracy and Stability of Numerical Algorithms, (2nd Edition), SIAM, Philadelphia