naginterfaces.library.lapacklin.dppequ¶
- naginterfaces.library.lapacklin.dppequ(uplo, n, ap)[source]¶
dppequ
computes a diagonal scaling matrix intended to equilibrate a real symmetric positive definite matrix , stored in packed format, and reduce its condition number.For full information please refer to the NAG Library document for f07gf
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f07/f07gff.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 .
- apfloat, array-like, shape
The symmetric matrix , packed by columns.
Only the elements of corresponding to the diagonal elements 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: or .
- (errno )
On entry, error in parameter .
Constraint: .
- (errno )
The th diagonal element of is not positive (and hence cannot be positive definite).
- Notes
dppequ
computes a diagonal scaling matrix chosen so thatThis 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