|
NAG[f07awc] NAG[nag_zgetri] - Inverse of complex matrix, matrix already factorized by f07arc (nag_zgetrf)
|
|
Calling Sequence
f07awc(a, ipiv, 'n'=n, 'fail'=fail)
nag_zgetri(. . .)
Parameters
|
a - Matrix(1..dim1, 1..dim2, datatype=complex[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_zgetri (f07awc) computes the inverse of a complex matrix , where has been factorized by f07arc (nag_zgetrf).
|
|
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 of factor 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 real floating-point operations is approximately .
The real analogue of this function is f07ajc (nag_dgetri).
|
|
|
Examples
|
|
>
|
n := 4:
a := Matrix([[-3.29 -2.39*I , -1.91 +4.42*I , -0.14 -1.35*I , 1.72 +1.35*I ], [0.2376120269469406 +0.2559596521570857*I , 4.895180634002975 -0.711362223485444*I , -0.462279846639494 +1.696610587680362*I , 1.226852844063328 +0.6189731619114427*I ], [-0.1019520808892006 -0.7010135339437114*I , -0.6691496431943212 +0.3688698547971655*I , -5.141410913810232 -1.129969734660953*I , 0.9982579915199449 +0.3850152275763778*I ], [-0.5358546703595748 +0.2707272529359829*I , -0.2040217794587079 +0.8601180679984047*I , 0.008233047063940029 +0.1210636819910635*I , 0.1482391810748419 -0.1252239986075848*I ]], datatype=complex[8]):
ipiv := Vector([3, 2, 3, 4], datatype=integer[kernelopts('wordsize')/8]):
NAG:-f07awc(a, ipiv, 'n' = n):
|

|
|