|
NAG[f07ajc] NAG[nag_dgetri] - Inverse of real matrix, matrix already factorized by f07adc (nag_dgetrf)
|
|
Calling Sequence
f07ajc(a, ipiv, 'n'=n, 'fail'=fail)
nag_dgetri(. . .)
Parameters
|
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.
|
|
|
ipiv - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array ipiv must be at least .
|
|
|
'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_dgetri (f07ajc) computes the inverse 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_SINGULAR"
Element of the diagonal is zero. is singular, and the inverse of cannot be computed.
|
|
Accuracy
|
|
The computed inverse satisfies a bound of the form:
where is a modest linear function of , and is the machine precision.
Note that a similar bound for cannot be guaranteed, although it is almost always satisfied. See Du Croz and Higham (1992).
|
|
Further Comments
|
|
The total number of floating-point operations is approximately .
The complex analogue of this function is f07awc (nag_zgetri).
|
|
|
Examples
|
|
>
|
n := 4:
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]):
ipiv := Vector([2, 2, 3, 4], datatype=integer[kernelopts('wordsize')/8]):
NAG:-f07ajc(a, ipiv, 'n' = n):
|
|
|