|
NAG[f07asc] NAG[nag_zgetrs] - Solution of complex system of linear equations, multiple right-hand sides, matrix already factorized by f07arc (nag_zgetrf)
|
|
Calling Sequence
f07asc(trans, a, ipiv, b, 'n'=n, 'nrhs'=nrhs, 'fail'=fail)
nag_zgetrs(. . .)
Parameters
|
trans - String;
|
|
|
On entry: indicates the form of the equations.
|
|
Constraint: "Nag_NoTrans", "Nag_Trans" or "Nag_ConjTrans". .
|
|
|
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 .
|
|
|
b - 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.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'nrhs'=nrhs - integer; (optional)
|
|
|
Default value: the second dimension of the array b.
|
|
On entry: , the number of right-hand sides.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_zgetrs (f07asc) solves a complex system of linear equations with multiple right-hand sides,
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: .
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.
|
|
Further Comments
|
|
The total number of real floating-point operations is approximately .
This function may be followed by a call to f07avc (nag_zgerfs) to refine the solution and return an error estimate.
The real analogue of this function is f07aec (nag_dgetrs).
|
|
|
Examples
|
|
>
|
trans := "Nag_NoTrans":
n := 4:
nrhs := 2:
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]):
b := Matrix([[26.26 +51.78*I , 31.32 -6.7*I ], [6.43 -8.68*I , 15.86 -1.42*I ], [-5.75 +25.31*I , -2.15 +30.19*I ], [1.16 +2.57*I , -2.56 +7.55*I ]], datatype=complex[8]):
NAG:-f07asc(trans, a, ipiv, b, 'n' = n, 'nrhs' = nrhs):
|
|
|