|
NAG[f07aec] NAG[nag_dgetrs] - Solution of real system of linear equations, multiple right-hand sides, matrix already factorized by f07adc (nag_dgetrf)
|
|
Calling Sequence
f07aec(trans, a, ipiv, b, 'n'=n, 'nrhs'=nrhs, 'fail'=fail)
nag_dgetrs(. . .)
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=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 .
|
|
|
b - 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.
|
|
|
'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_dgetrs (f07aec) solves a real system of linear equations with multiple right-hand sides,
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: .
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 floating-point operations is approximately .
This function may be followed by a call to f07ahc (nag_dgerfs) to refine the solution and return an error estimate.
The complex analogue of this function is f07asc (nag_zgetrs).
|
|
|
Examples
|
|
>
|
trans := "Nag_NoTrans":
n := 4:
nrhs := 2:
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]):
b := Matrix([[9.52, 18.47], [24.35, 2.25], [0.77, -13.28], [-6.22, -6.21]], datatype=float[8]):
NAG:-f07aec(trans, a, ipiv, b, 'n' = n, 'nrhs' = nrhs):
|
|
|