naginterfaces.library.lapacklin.dspcon¶
- naginterfaces.library.lapacklin.dspcon(uplo, n, ap, ipiv, anorm)[source]¶
dspcon
estimates the condition number of a real symmetric indefinite matrix , where has been factorized bydsptrf()
, using packed storage.For full information please refer to the NAG Library document for f07pg
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f07/f07pgf.html
- Parameters
- uplostr, length 1
Specifies how has been factorized.
, where is upper triangular.
, where is lower triangular.
- nint
, the order of the matrix .
- apfloat, array-like, shape
The factorization of stored in packed form, as returned by
dsptrf()
.- ipivint, array-like, shape
Details of the interchanges and the block structure of , as returned by
dsptrf()
.- anormfloat
The -norm of the original matrix , which may be computed by calling
blas.dlansp
with its argument . must be computed either before callingdsptrf()
or else from a copy of the original matrix .
- Returns
- rcondfloat
An estimate of the reciprocal of the condition number of . is set to zero if exact singularity is detected or the estimate underflows. If is less than machine precision, is singular to working precision.
- Raises
- NagValueError
- (errno )
On entry, error in parameter .
Constraint: or .
- (errno )
On entry, error in parameter .
Constraint: .
- (errno )
On entry, error in parameter .
Constraint: .
- Notes
dspcon
estimates the condition number (in the -norm) of a real symmetric indefinite matrix :Since is symmetric, .
Because is infinite if is singular, the function actually returns an estimate of the reciprocal of .
The function should be preceded by a call to
blas.dlansp
to compute and a call todsptrf()
to compute the Bunch–Kaufman factorization of . The function then uses Higham’s implementation of Hager’s method (see Higham (1988)) to estimate .
- References
Higham, N J, 1988, FORTRAN codes for estimating the one-norm of a real or complex matrix, with applications to condition estimation, ACM Trans. Math. Software (14), 381–396