ppsvx#
Functions
-
void sppsvx(const char *fact, const char *uplo, const INT n, const INT nrhs, f32 *restrict AP, f32 *restrict AFP, char *equed, f32 *restrict S, f32 *restrict B, const INT ldb, f32 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, f32 *restrict work, INT *restrict iwork, INT *info)#
SPPSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to compute the solution to a real system of linear equations.
where A is anA * X = B
n-by-nsymmetric positive definite matrix stored in packed format and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:diag(S)*A*diag(S) * inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix
A, but if equilibration is used,Ais overwritten bydiag(S)*A*diag(S)andBbydiag(S)*B.If
fact='N'or'E', the Cholesky decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = U**T * U, if uplo = 'U', or A = L * L**T, if uplo = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix.
If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than machine precision,info=n+1is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.The system of equations is solved for X using the factored form of
A.Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
If equilibration was used, the matrix X is premultiplied by
diag(S)so that it solves the original system before equilibration.
equedis an input argument iffact='F'; otherwise it is an output argument.- Further Details:
The packed storage scheme is illustrated by the following example when
n=4,uplo='U':Two-dimensional storage of the symmetric matrix A:
a00 a01 a02 a03 a11 a12 a13 a22 a23 (aij = conjg(aji)) a33Packed storage of the upper triangle of A:
AP = [ a00, a01, a11, a02, a12, a22, a03, a13, a23, a33 ]
Parameters
infact'F':AFPcontains the factored form ofA. Ifequed='Y',Ahas been equilibrated with scaling factors given byS;APandAFPwill not be modified.'N': The matrixAwill be copied toAFPand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFPand factored.
inuplo'U': Upper triangle of A is stored'L': Lower triangle of A is stored
innThe number of linear equations, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAPArray of dimension
n*(n+1)/2. On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array, except iffact='F'andequed='Y', then A must contain the equilibrated matrix diag(S)*A*diag(S). 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. See below for further details. A is not modified iffact='F'or'N', or iffact='E'andequed='N'on exit. On exit, iffact='E'andequed='Y', A is overwritten by diag(S)*A*diag(S).inoutAFPArray of dimension
n*(n+1)/2. Iffact='F', an input argument containing the triangular factor U or L from the Cholesky factorization, in the same storage format as A. Iffact='N'or'E', an output argument returning the triangular factor of the (possibly equilibrated) matrix A.inoutequed'N': No equilibration (always true iffact='N')'Y': Equilibration was done, i.e., A has been replaced by diag(S) * A * diag(S)
inoutSArray of dimension (
n). The scale factors for A; not accessed ifequed='N'.Sis an input argument iffact='F'; otherwise it is an output argument. Iffact='F'andequed='Y', each element ofSmust be positive.inoutBArray of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, ifequed='N', B is not modified; ifequed='Y', B is overwritten by diag(S) * B.inldbThe leading dimension of the array
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Ifinfo=0orinfo=n+1, then-by-nrhssolution matrix X to the original system of equations. Note that ifequed='Y', A and B are modified on exit, and the solution to the equilibrated system is inv(diag(S))*X.inldxThe leading dimension of the array
X.ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A after equilibration (if done).
outferrArray of dimension (
nrhs). The estimated forward error bound for each solution vector.outberrArray of dimension (
nrhs). The componentwise relative backward error of each solution vector.outworkArray of dimension
3*n.outiworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=n, the leading principal minor of order i of A is not positive, so the factorization could not be completed, and the solution has not been computed.rcond=0is returned.info=n+1: U is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value of rcond would suggest.
void sppsvx(
const char* fact,
const char* uplo,
const INT n,
const INT nrhs,
f32* restrict AP,
f32* restrict AFP,
char* equed,
f32* restrict S,
f32* restrict B,
const INT ldb,
f32* restrict X,
const INT ldx,
f32* rcond,
f32* restrict ferr,
f32* restrict berr,
f32* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void dppsvx(const char *fact, const char *uplo, const INT n, const INT nrhs, f64 *restrict AP, f64 *restrict AFP, char *equed, f64 *restrict S, f64 *restrict B, const INT ldb, f64 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, f64 *restrict work, INT *restrict iwork, INT *info)#
DPPSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to compute the solution to a real system of linear equations.
where A is anA * X = B
n-by-nsymmetric positive definite matrix stored in packed format and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:diag(S)*A*diag(S) * inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix
A, but if equilibration is used,Ais overwritten bydiag(S)*A*diag(S)andBbydiag(S)*B.If
fact='N'or'E', the Cholesky decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = U**T * U, if uplo = 'U', or A = L * L**T, if uplo = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix.
If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than machine precision,info=n+1is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.The system of equations is solved for X using the factored form of
A.Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
If equilibration was used, the matrix X is premultiplied by
diag(S)so that it solves the original system before equilibration.
equedis an input argument iffact='F'; otherwise it is an output argument.- Further Details:
The packed storage scheme is illustrated by the following example when
n=4,uplo='U':Two-dimensional storage of the symmetric matrix A:
a00 a01 a02 a03 a11 a12 a13 a22 a23 (aij = conjg(aji)) a33Packed storage of the upper triangle of A:
AP = [ a00, a01, a11, a02, a12, a22, a03, a13, a23, a33 ]
Parameters
infact'F':AFPcontains the factored form ofA. Ifequed='Y',Ahas been equilibrated with scaling factors given byS;APandAFPwill not be modified.'N': The matrixAwill be copied toAFPand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFPand factored.
inuplo'U': Upper triangle of A is stored'L': Lower triangle of A is stored
innThe number of linear equations, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAPArray of dimension
n*(n+1)/2. On entry, the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array, except iffact='F'andequed='Y', then A must contain the equilibrated matrix diag(S)*A*diag(S). 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. See below for further details. A is not modified iffact='F'or'N', or iffact='E'andequed='N'on exit. On exit, iffact='E'andequed='Y', A is overwritten by diag(S)*A*diag(S).inoutAFPArray of dimension
n*(n+1)/2. Iffact='F', an input argument containing the triangular factor U or L from the Cholesky factorization, in the same storage format as A. Iffact='N'or'E', an output argument returning the triangular factor of the (possibly equilibrated) matrix A.inoutequed'N': No equilibration (always true iffact='N')'Y': Equilibration was done, i.e., A has been replaced by diag(S) * A * diag(S)
inoutSArray of dimension (
n). The scale factors for A; not accessed ifequed='N'.Sis an input argument iffact='F'; otherwise it is an output argument. Iffact='F'andequed='Y', each element ofSmust be positive.inoutBArray of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, ifequed='N', B is not modified; ifequed='Y', B is overwritten by diag(S) * B.inldbThe leading dimension of the array
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Ifinfo=0orinfo=n+1, then-by-nrhssolution matrix X to the original system of equations. Note that ifequed='Y', A and B are modified on exit, and the solution to the equilibrated system is inv(diag(S))*X.inldxThe leading dimension of the array
X.ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A after equilibration (if done).
outferrArray of dimension (
nrhs). The estimated forward error bound for each solution vector.outberrArray of dimension (
nrhs). The componentwise relative backward error of each solution vector.outworkArray of dimension
3*n.outiworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=n, the leading principal minor of order i of A is not positive, so the factorization could not be completed, and the solution has not been computed.rcond=0is returned.info=n+1: U is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value of rcond would suggest.
void dppsvx(
const char* fact,
const char* uplo,
const INT n,
const INT nrhs,
f64* restrict AP,
f64* restrict AFP,
char* equed,
f64* restrict S,
f64* restrict B,
const INT ldb,
f64* restrict X,
const INT ldx,
f64* rcond,
f64* restrict ferr,
f64* restrict berr,
f64* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void cppsvx(const char *fact, const char *uplo, const INT n, const INT nrhs, c64 *restrict AP, c64 *restrict AFP, char *equed, f32 *restrict S, c64 *restrict B, const INT ldb, c64 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, c64 *restrict work, f32 *restrict rwork, INT *info)#
CPPSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to compute the solution to a complex system of linear equations.
where A is anA * X = B
n-by-nHermitian positive definite matrix stored in packed format and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:diag(S)*A*diag(S) * inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix
A, but if equilibration is used,Ais overwritten bydiag(S)*A*diag(S)andBbydiag(S)*B.If
fact='N'or'E', the Cholesky decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = U**H * U, if uplo = 'U', or A = L * L**H, if uplo = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix.
If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than machine precision,info=n+1is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.The system of equations is solved for X using the factored form of
A.Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
If equilibration was used, the matrix X is premultiplied by
diag(S)so that it solves the original system before equilibration.
equedis an input argument iffact='F'; otherwise it is an output argument.- Further Details:
The packed storage scheme is illustrated by the following example when
n=4,uplo='U':Two-dimensional storage of the Hermitian matrix A:
a00 a01 a02 a03 a11 a12 a13 a22 a23 (aij = conjg(aji)) a33Packed storage of the upper triangle of A:
AP = [ a00, a01, a11, a02, a12, a22, a03, a13, a23, a33 ]
Parameters
infact'F':AFPcontains the factored form ofA. Ifequed='Y',Ahas been equilibrated with scaling factors given byS;APandAFPwill not be modified.'N': The matrixAwill be copied toAFPand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFPand factored.
inuplo'U': Upper triangle of A is stored'L': Lower triangle of A is stored
innThe number of linear equations, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAPArray of dimension
n*(n+1)/2. On entry, the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array, except iffact='F'andequed='Y', then A must contain the equilibrated matrix diag(S)*A*diag(S). 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. See below for further details. A is not modified iffact='F'or'N', or iffact='E'andequed='N'on exit. On exit, iffact='E'andequed='Y', A is overwritten by diag(S)*A*diag(S).inoutAFPArray of dimension
n*(n+1)/2. Iffact='F', an input argument containing the triangular factor U or L from the Cholesky factorization, in the same storage format as A. Iffact='N'or'E', an output argument returning the triangular factor of the (possibly equilibrated) matrix A.inoutequed'N': No equilibration (always true iffact='N')'Y': Equilibration was done, i.e., A has been replaced by diag(S) * A * diag(S)
inoutSArray of dimension (
n). The scale factors for A; not accessed ifequed='N'.Sis an input argument iffact='F'; otherwise it is an output argument. Iffact='F'andequed='Y', each element ofSmust be positive.inoutBArray of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, ifequed='N', B is not modified; ifequed='Y', B is overwritten by diag(S) * B.inldbThe leading dimension of the array
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Ifinfo=0orinfo=n+1, then-by-nrhssolution matrix X to the original system of equations. Note that ifequed='Y', A and B are modified on exit, and the solution to the equilibrated system is inv(diag(S))*X.inldxThe leading dimension of the array
X.ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A after equilibration (if done).
outferrArray of dimension (
nrhs). The estimated forward error bound for each solution vector.outberrArray of dimension (
nrhs). The componentwise relative backward error of each solution vector.outworkComplex array of dimension
2*n.outrworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=n, the leading principal minor of order i of A is not positive, so the factorization could not be completed, and the solution has not been computed.rcond=0is returned.info=n+1: U is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value of rcond would suggest.
void cppsvx(
const char* fact,
const char* uplo,
const INT n,
const INT nrhs,
c64* restrict AP,
c64* restrict AFP,
char* equed,
f32* restrict S,
c64* restrict B,
const INT ldb,
c64* restrict X,
const INT ldx,
f32* rcond,
f32* restrict ferr,
f32* restrict berr,
c64* restrict work,
f32* restrict rwork,
INT* info
);
Functions
-
void zppsvx(const char *fact, const char *uplo, const INT n, const INT nrhs, c128 *restrict AP, c128 *restrict AFP, char *equed, f64 *restrict S, c128 *restrict B, const INT ldb, c128 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, c128 *restrict work, f64 *restrict rwork, INT *info)#
ZPPSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to compute the solution to a complex system of linear equations.
where A is anA * X = B
n-by-nHermitian positive definite matrix stored in packed format and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:diag(S)*A*diag(S) * inv(diag(S))*X = diag(S)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix
A, but if equilibration is used,Ais overwritten bydiag(S)*A*diag(S)andBbydiag(S)*B.If
fact='N'or'E', the Cholesky decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = U**H * U, if uplo = 'U', or A = L * L**H, if uplo = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix.
If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than machine precision,info=n+1is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.The system of equations is solved for X using the factored form of
A.Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
If equilibration was used, the matrix X is premultiplied by
diag(S)so that it solves the original system before equilibration.
equedis an input argument iffact='F'; otherwise it is an output argument.- Further Details:
The packed storage scheme is illustrated by the following example when
n=4,uplo='U':Two-dimensional storage of the Hermitian matrix A:
a00 a01 a02 a03 a11 a12 a13 a22 a23 (aij = conjg(aji)) a33Packed storage of the upper triangle of A:
AP = [ a00, a01, a11, a02, a12, a22, a03, a13, a23, a33 ]
Parameters
infact'F':AFPcontains the factored form ofA. Ifequed='Y',Ahas been equilibrated with scaling factors given byS;APandAFPwill not be modified.'N': The matrixAwill be copied toAFPand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFPand factored.
inuplo'U': Upper triangle of A is stored'L': Lower triangle of A is stored
innThe number of linear equations, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAPArray of dimension
n*(n+1)/2. On entry, the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array, except iffact='F'andequed='Y', then A must contain the equilibrated matrix diag(S)*A*diag(S). 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. See below for further details. A is not modified iffact='F'or'N', or iffact='E'andequed='N'on exit. On exit, iffact='E'andequed='Y', A is overwritten by diag(S)*A*diag(S).inoutAFPArray of dimension
n*(n+1)/2. Iffact='F', an input argument containing the triangular factor U or L from the Cholesky factorization, in the same storage format as A. Iffact='N'or'E', an output argument returning the triangular factor of the (possibly equilibrated) matrix A.inoutequed'N': No equilibration (always true iffact='N')'Y': Equilibration was done, i.e., A has been replaced by diag(S) * A * diag(S)
inoutSArray of dimension (
n). The scale factors for A; not accessed ifequed='N'.Sis an input argument iffact='F'; otherwise it is an output argument. Iffact='F'andequed='Y', each element ofSmust be positive.inoutBArray of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, ifequed='N', B is not modified; ifequed='Y', B is overwritten by diag(S) * B.inldbThe leading dimension of the array
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Ifinfo=0orinfo=n+1, then-by-nrhssolution matrix X to the original system of equations. Note that ifequed='Y', A and B are modified on exit, and the solution to the equilibrated system is inv(diag(S))*X.inldxThe leading dimension of the array
X.ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A after equilibration (if done).
outferrArray of dimension (
nrhs). The estimated forward error bound for each solution vector.outberrArray of dimension (
nrhs). The componentwise relative backward error of each solution vector.outworkComplex array of dimension
2*n.outrworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=n, the leading principal minor of order i of A is not positive, so the factorization could not be completed, and the solution has not been computed.rcond=0is returned.info=n+1: U is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value of rcond would suggest.
void zppsvx(
const char* fact,
const char* uplo,
const INT n,
const INT nrhs,
c128* restrict AP,
c128* restrict AFP,
char* equed,
f64* restrict S,
c128* restrict B,
const INT ldb,
c128* restrict X,
const INT ldx,
f64* rcond,
f64* restrict ferr,
f64* restrict berr,
c128* restrict work,
f64* restrict rwork,
INT* info
);