naginterfaces.library.sparse.direct_real_gen_cond¶
- naginterfaces.library.sparse.direct_real_gen_cond(norm, n, il, lval, iu, uval, anorm)[source]¶
direct_real_gen_cond
computes an estimate of the reciprocal of the condition number of a sparse matrix given an factorization of the matrix computed bydirect_real_gen_lu()
.For full information please refer to the NAG Library document for f11mg
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f11/f11mgf.html
- Parameters
- normstr, length 1
Indicates whether or is to be estimated.
or
is estimated.
is estimated.
- nint
, the order of the matrix .
- ilint, array-like, shape
Records the sparsity pattern of matrix as computed by
direct_real_gen_lu()
.- lvalfloat, array-like, shape
Records the nonzero values of matrix and some nonzero values of matrix as computed by
direct_real_gen_lu()
.- iuint, array-like, shape
Records the sparsity pattern of matrix as computed by
direct_real_gen_lu()
.- uvalfloat, array-like, shape
Records some nonzero values of matrix as computed by
direct_real_gen_lu()
.- anormfloat
If or , the -norm of the matrix .
If , the -norm of the matrix .
may be computed by calling
direct_real_gen_norm()
with the same value for the argument .
- 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, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: , or .
- Notes
direct_real_gen_cond
estimates the condition number of a real sparse matrix , in either the -norm or the -norm:Note that .
Because the condition number is infinite if is singular, the function actually returns an estimate of the reciprocal of the condition number.
The function should be preceded by a call to
direct_real_gen_norm()
to compute or , and a call todirect_real_gen_lu()
to compute the factorization of . The function then estimates or and computes the reciprocal of the condition number.