hprfs#
Functions
-
void chprfs(const char *uplo, const INT n, const INT nrhs, const c64 *restrict AP, const c64 *restrict AFP, const INT *restrict ipiv, const c64 *restrict B, const INT ldb, c64 *restrict X, const INT ldx, f32 *restrict ferr, f32 *restrict berr, c64 *restrict work, f32 *restrict rwork, INT *info)#
CHPRFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian indefinite and packed, and provides error bounds and backward error estimates for the solution.
Parameters
inuplo'U': Upper triangle of A is stored'L': Lower triangle of A is stored
innThe order of the matrix A.
n>=0.innrhsThe number of right hand sides, i.e., the number of columns of the matrices B and X.
nrhs>=0.inAPArray of dimension
n*(n+1)/2. The upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows: ifuplo='U',AP[i + j*(j+1)/2] = A(i,j)for0<=i<=j; ifuplo='L',AP[i + j*(2*n-j-1)/2] = A(i,j)forj<=i<=n-1.inAFPArray of dimension
n*(n+1)/2. The factored form of the matrix A. AFP contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H as computed bychptrf, stored as a packed triangular matrix.inipivArray of dimension
n. Details of the interchanges and the block structure of D as determined bychptrf.inBArray of dimension
(ldb,nrhs). The right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).inoutXArray of dimension
(ldx,nrhs). On entry, the solution matrix X, as computed bychptrs. On exit, the improved solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outferrArray of dimension
nrhs. The estimated forward error bound for each solution vectorX(j)(the j-th column of the solution matrix X). Ifxtrueis the true solution corresponding toX(j),ferr[j]is an estimated upper bound for the magnitude of the largest element in(X(j)-xtrue)divided by the magnitude of the largest element inX(j). The estimate is as reliable as the estimate forrcond, and is almost always a slight overestimate of the true error.outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution).outworkWorkspace array of dimension
2*n.outrworkWorkspace array of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal value
void chprfs(
const char* uplo,
const INT n,
const INT nrhs,
const c64* restrict AP,
const c64* restrict AFP,
const INT* restrict ipiv,
const c64* restrict B,
const INT ldb,
c64* restrict X,
const INT ldx,
f32* restrict ferr,
f32* restrict berr,
c64* restrict work,
f32* restrict rwork,
INT* info
);
Functions
-
void zhprfs(const char *uplo, const INT n, const INT nrhs, const c128 *restrict AP, const c128 *restrict AFP, const INT *restrict ipiv, const c128 *restrict B, const INT ldb, c128 *restrict X, const INT ldx, f64 *restrict ferr, f64 *restrict berr, c128 *restrict work, f64 *restrict rwork, INT *info)#
ZHPRFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian indefinite and packed, and provides error bounds and backward error estimates for the solution.
Parameters
inuplo'U': Upper triangle of A is stored'L': Lower triangle of A is stored
innThe order of the matrix A.
n>=0.innrhsThe number of right hand sides, i.e., the number of columns of the matrices B and X.
nrhs>=0.inAPArray of dimension
n*(n+1)/2. The upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows: ifuplo='U',AP[i + j*(j+1)/2] = A(i,j)for0<=i<=j; ifuplo='L',AP[i + j*(2*n-j-1)/2] = A(i,j)forj<=i<=n-1.inAFPArray of dimension
n*(n+1)/2. The factored form of the matrix A. AFP contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H as computed byzhptrf, stored as a packed triangular matrix.inipivArray of dimension
n. Details of the interchanges and the block structure of D as determined byzhptrf.inBArray of dimension
(ldb,nrhs). The right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).inoutXArray of dimension
(ldx,nrhs). On entry, the solution matrix X, as computed byzhptrs. On exit, the improved solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outferrArray of dimension
nrhs. The estimated forward error bound for each solution vectorX(j)(the j-th column of the solution matrix X). Ifxtrueis the true solution corresponding toX(j),ferr[j]is an estimated upper bound for the magnitude of the largest element in(X(j)-xtrue)divided by the magnitude of the largest element inX(j). The estimate is as reliable as the estimate forrcond, and is almost always a slight overestimate of the true error.outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution).outworkWorkspace array of dimension
2*n.outrworkWorkspace array of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal value
void zhprfs(
const char* uplo,
const INT n,
const INT nrhs,
const c128* restrict AP,
const c128* restrict AFP,
const INT* restrict ipiv,
const c128* restrict B,
const INT ldb,
c128* restrict X,
const INT ldx,
f64* restrict ferr,
f64* restrict berr,
c128* restrict work,
f64* restrict rwork,
INT* info
);