|
NAG[f07agc] NAG[nag_dgecon] - Estimate condition number of real matrix, matrix already factorized by f07adc (nag_dgetrf)
|
|
Calling Sequence
f07agc(norm_type, a, anorm, rcond, 'n'=n, 'fail'=fail)
nag_dgecon(. . .)
Parameters
|
norm_type - String;
|
|
|
On entry: indicates whether or is estimated.
|
|
is estimated.
|
|
Constraint: , "Nag_OneNorm" or "Nag_InfNorm". .
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
anorm - float;
|
|
|
anorm must be computed either before calling f07adc (nag_dgetrf) or else from a copy of the original matrix .
|
|
Constraint: . .
|
|
|
rcond - assignable;
|
|
|
Note: On exit the variable rcond will have a value of type float.
|
|
On exit: an estimate of the reciprocal of the condition number of . rcond is set to zero if exact singularity is detected or the estimate underflows. If rcond is less than machine precision, is singular to working precision.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dgecon (f07agc) estimates the condition number of a real matrix , where has been factorized by f07adc (nag_dgetrf).
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_REAL"
On entry, . Constraint: .
|
|
Accuracy
|
|
The computed estimate rcond is never less than the true value , and in practice is nearly always less than , although examples can be constructed where rcond is much larger.
|
|
Further Comments
|
|
A call to nag_dgecon (f07agc) involves solving a number of systems of linear equations of the form or ; the number is usually 4 or 5 and never more than 11. Each solution involves approximately floating-point operations but takes considerably longer than a call to f07aec (nag_dgetrs) with one right-hand side, because extra care is taken to avoid overflow when is approximately singular.
The complex analogue of this function is f07auc (nag_zgecon).
|
|
|
Examples
|
|
>
|
norm_type := "Nag_OneNorm":
n := 4:
anorm := 9.739999999999998:
a := Matrix([[5.25, -2.95, -0.95, -3.8], [0.3428571428571429, 3.891428571428571, 2.375714285714285, 0.4128571428571428], [0.300952380952381, -0.4631179637787567, -1.513859275575135, 0.2948206069505628], [-0.2114285714285714, -0.3298825256975037, 0.004723367663983707, 0.1313732394878517]], datatype=float[8]):
NAG:-f07agc(norm_type, a, anorm, rcond, 'n' = n):
|
|
|