|
NAG[f07pvc] NAG[nag_zhprfs] - Refined solution with error bounds of complex Hermitian indefinite system of linear equations, multiple right-hand sides, packed storage
|
|
Calling Sequence
f07pvc(uplo, ap, afp, ipiv, b, x, ferr, berr, 'n'=n, 'nrhs'=nrhs, 'fail'=fail)
nag_zhprfs(. . .)
Parameters
|
uplo - String;
|
|
|
On entry: indicates whether the upper or lower triangular part of is stored and how has been factorized.
|
|
Constraint: "Nag_Upper" or "Nag_Lower". .
|
|
|
ap - Vector(1..dim, datatype=complex[8]);
|
|
|
Note: the dimension, dim, of the array ap must be at least .
|
|
|
afp - Vector(1..dim, datatype=complex[8]);
|
|
|
Note: the dimension, dim, of the array afp must be at least .
|
|
On entry: details of the factorization of stored in packed form, as returned by f07prc (nag_zhptrf).
|
|
|
ipiv - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array ipiv must be at least .
|
|
On entry: details of the interchanges and the block structure of , as returned by f07prc (nag_zhptrf).
|
|
|
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.
|
|
|
x - 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.
|
|
On exit: the improved solution matrix .
|
|
|
ferr - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array ferr must be at least .
|
|
|
berr - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array berr must be at least .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array ap.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'nrhs'=nrhs - integer; (optional)
|
|
|
Default value: the second dimension of the arrays b, x.
|
|
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_zhprfs (f07pvc) returns error bounds for the solution of a complex Hermitian indefinite system of linear equations with multiple right-hand sides, , using packed storage. It improves the solution by iterative refinement, in order to reduce the backward error as much as possible.
|
|
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.
|
|
Accuracy
|
|
The bounds returned in ferr are not rigorous, because they are estimated, not computed exactly; but in practice they almost always overestimate the actual error.
|
|
Further Comments
|
|
For each right-hand side, computation of the backward error involves a minimum of real floating-point operations. Each step of iterative refinement involves an additional real operations. At most five steps of iterative refinement are performed, but usually only one or two steps are required.
Estimating the forward error involves solving a number of systems of linear equations of the form ; the number is usually 5 and never more than 11. Each solution involves approximately real operations.
The real analogue of this function is f07phc (nag_dsprfs).
|
|
|
Examples
|
|
>
|
uplo := "Nag_Lower":
n := 4:
nrhs := 2:
ap := Vector([-1.36 +0*I, 1.58 -0.9*I, -8.869999999999999 +0*I, 2.21 +0.21*I, -1.84 +0.03*I, -4.63 +0*I, 3.91 -1.5*I, -1.78 -1.18*I, 0.11 -0.11*I, -1.84 +0*I], datatype=complex[8], order='C_order'):
afp := Vector([-4.981630459440283 +0*I, 0.210214907090655 +0.1106935130516159*I, -7.724450141995383 +0*I, 0.3100287981271241 -0.04333020743962702*I, -0.1518120207240102 -0.3742958425613706*I, -1.36 +0*I, 0.5637050486508776 -0.2850349501519716*I, 0.339658279960361 -0.03031451811355639*I, 3.91 -1.5*I, -1.84 +0*I], datatype=complex[8], order='C_order'):
ipiv := Vector([1, 2, -1, -1], datatype=integer[kernelopts('wordsize')/8]):
b := Matrix([[7.79 +5.48*I , -35.39 +18.01*I ], [-0.77 -16.05*I , 4.23 -70.02*I ], [-9.58 +3.88*I , -24.79 -8.4*I ], [2.98 -10.18*I , 28.68 -39.89*I ]], datatype=complex[8], order='C_order'):
x := Matrix([[1 -1*I , 2.999999999999999 -3.999999999999999*I ], [-1 +2.000000000000001*I , -1 +5.000000000000002*I ], [3 -2*I , 6.999999999999999 -2*I ], [2 +0.9999999999999998*I , -8 +5.999999999999999*I ]], datatype=complex[8], order='C_order'):
ferr := Vector(2, datatype=float[8]):
berr := Vector(2, datatype=float[8]):
NAG:-f07pvc(uplo, ap, afp, ipiv, b, x, ferr, berr, 'n' = n, 'nrhs' = nrhs):
|
|
|