naginterfaces.library.lapacklin.zpoequ

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

zpoequ computes a diagonal scaling matrix intended to equilibrate a complex Hermitian positive definite matrix and reduce its condition number.

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

https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/f07/f07ftf.html

Parameters
nint

, the order of the matrix .

acomplex, 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

zpoequ 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