naginterfaces.library.lapacklin.zgbequ¶
- naginterfaces.library.lapacklin.zgbequ(m, kl, ku, ab)[source]¶
zgbequ
computes diagonal scaling matrices and intended to equilibrate a complex band matrix of band width , and reduce its condition number.For full information please refer to the NAG Library document for f07bt
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f07/f07btf.html
- Parameters
- mint
, the number of rows of the matrix .
- klint
, the number of subdiagonals of the matrix .
- kuint
, the number of superdiagonals of the matrix .
- abcomplex, array-like, shape
The band matrix whose scaling factors are to be computed.
See Further Comments for further details.
- Returns
- rfloat, ndarray, shape
If no exception or warning is raised or > , contains the row scale factors, the diagonal elements of . The elements of will be positive.
- cfloat, ndarray, shape
If no exception or warning is raised, contains the column scale factors, the diagonal elements of . The elements of will be positive.
- rowcndfloat
If no exception or warning is raised or > , 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 .
- colcndfloat
If no exception or warning is raised, contains the ratio of the smallest value of to the largest value of .
If , 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 )
On entry, error in parameter .
Constraint: .
- (errno )
On entry, error in parameter .
Constraint: .
- (errno )
On entry, error in parameter .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
Row of is exactly zero.
- (errno )
Column of is exactly zero.
- Notes
zgbequ
computes the diagonal scaling matrices. The diagonal scaling matrices are chosen to try to make the elements of largest absolute value in each row and column of the matrix given byhave absolute value . The diagonal elements of and are restricted to lie in the safe range , where is the value returned by function
machine.real_safe
. Use of these scaling factors is not guaranteed to reduce the condition number of but works well in practice.