naginterfaces.library.lapacklin.zpbequ

naginterfaces.library.lapacklin.zpbequ(uplo, n, kd, ab)[source]

zpbequ computes a diagonal scaling matrix intended to equilibrate a complex Hermitian positive definite band matrix , with bandwidth , and reduce its condition number.

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f07/f07htf.html

Parameters
uplostr, length 1

Indicates whether the upper or lower triangular part of is stored in the array , as follows:

The upper triangle of is stored.

The lower triangle of is stored.

nint

, the order of the matrix .

kdint

, the number of superdiagonals of the matrix if , or the number of subdiagonals if .

abcomplex, array-like, shape

The upper or lower triangle of the Hermitian positive definite band matrix whose scaling factors are to be computed.

Only the elements of the array corresponding to the diagonal elements of are referenced. (Row of when , row of when .)

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: or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

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

Notes

zpbequ 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