ptsvx#
Functions
-
void sptsvx(const char *fact, const INT n, const INT nrhs, const f32 *restrict D, const f32 *restrict E, f32 *restrict DF, f32 *restrict EF, const f32 *restrict B, const INT ldb, f32 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, f32 *restrict work, INT *info)#
SPTSVX uses the factorization A = L*D*L**T to compute the solution to a real system of linear equations A*X = B, where A is an N-by-N symmetric positive definite tridiagonal matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the matrix A is factored as A = L*D*L**T, where L is a unit lower bidiagonal matrix and D is diagonal. The factorization can also be regarded as having the form A = U**T*D*U.If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. 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.
Parameters
infact'F': On entry, DF and EF contain the factored form of A. D, E, DF, and EF will not be modified.'N': The matrix A will be copied to DF and EF and factored.
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.inDArray of dimension
n. The n diagonal elements of the tridiagonal matrix A.inEArray of dimension
n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.inoutDFArray of dimension
n. Iffact='F', then DF is an input argument and on entry contains the n diagonal elements of the diagonal matrix D from the L*D*L**T factorization of A. Iffact='N', then DF is an output argument and on exit contains the n diagonal elements of the diagonal matrix D from the L*D*L**T factorization of A.inoutEFArray of dimension
n-1. Iffact='F', then EF is an input argument and on entry contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**T factorization of A. Iffact='N', then EF is an output argument and on exit contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**T factorization of A.inBArray of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXArray of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkArray of dimension
2*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.
void sptsvx(
const char* fact,
const INT n,
const INT nrhs,
const f32* restrict D,
const f32* restrict E,
f32* restrict DF,
f32* restrict EF,
const f32* restrict B,
const INT ldb,
f32* restrict X,
const INT ldx,
f32* rcond,
f32* restrict ferr,
f32* restrict berr,
f32* restrict work,
INT* info
);
Functions
-
void dptsvx(const char *fact, const INT n, const INT nrhs, const f64 *restrict D, const f64 *restrict E, f64 *restrict DF, f64 *restrict EF, const f64 *restrict B, const INT ldb, f64 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, f64 *restrict work, INT *info)#
DPTSVX uses the factorization A = L*D*L**T to compute the solution to a real system of linear equations A*X = B, where A is an N-by-N symmetric positive definite tridiagonal matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the matrix A is factored as A = L*D*L**T, where L is a unit lower bidiagonal matrix and D is diagonal. The factorization can also be regarded as having the form A = U**T*D*U.If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. 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.
Parameters
infact'F': On entry, DF and EF contain the factored form of A. D, E, DF, and EF will not be modified.'N': The matrix A will be copied to DF and EF and factored.
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.inDArray of dimension
n. The n diagonal elements of the tridiagonal matrix A.inEArray of dimension
n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.inoutDFArray of dimension
n. Iffact='F', then DF is an input argument and on entry contains the n diagonal elements of the diagonal matrix D from the L*D*L**T factorization of A. Iffact='N', then DF is an output argument and on exit contains the n diagonal elements of the diagonal matrix D from the L*D*L**T factorization of A.inoutEFArray of dimension
n-1. Iffact='F', then EF is an input argument and on entry contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**T factorization of A. Iffact='N', then EF is an output argument and on exit contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**T factorization of A.inBArray of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXArray of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkArray of dimension
2*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.
void dptsvx(
const char* fact,
const INT n,
const INT nrhs,
const f64* restrict D,
const f64* restrict E,
f64* restrict DF,
f64* restrict EF,
const f64* restrict B,
const INT ldb,
f64* restrict X,
const INT ldx,
f64* rcond,
f64* restrict ferr,
f64* restrict berr,
f64* restrict work,
INT* info
);
Functions
-
void cptsvx(const char *fact, const INT n, const INT nrhs, const f32 *restrict D, const c64 *restrict E, f32 *restrict DF, c64 *restrict EF, const 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)#
CPTSVX uses the factorization A = L*D*L**H to compute the solution to a complex system of linear equations A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the matrix A is factored as A = L*D*L**H, where L is a unit lower bidiagonal matrix and D is diagonal. The factorization can also be regarded as having the form A = U**H*D*U.If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. 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.
Parameters
infact'F': On entry, DF and EF contain the factored form of A. D, E, DF, and EF will not be modified.'N': The matrix A will be copied to DF and EF and factored.
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.inDArray of dimension
n. The n diagonal elements of the tridiagonal matrix A.inEComplex array of dimension
n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.inoutDFArray of dimension
n. Iffact='F', then DF is an input argument and on entry contains the n diagonal elements of the diagonal matrix D from the L*D*L**H factorization of A. Iffact='N', then DF is an output argument and on exit contains the n diagonal elements of the diagonal matrix D from the L*D*L**H factorization of A.inoutEFComplex array of dimension
n-1. Iffact='F', then EF is an input argument and on entry contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A. Iffact='N', then EF is an output argument and on exit contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A.inBComplex array of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXComplex array of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkComplex array of dimension
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.
void cptsvx(
const char* fact,
const INT n,
const INT nrhs,
const f32* restrict D,
const c64* restrict E,
f32* restrict DF,
c64* restrict EF,
const 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 zptsvx(const char *fact, const INT n, const INT nrhs, const f64 *restrict D, const c128 *restrict E, f64 *restrict DF, c128 *restrict EF, const 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)#
ZPTSVX uses the factorization A = L*D*L**H to compute the solution to a complex system of linear equations A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the matrix A is factored as A = L*D*L**H, where L is a unit lower bidiagonal matrix and D is diagonal. The factorization can also be regarded as having the form A = U**H*D*U.If the leading principal minor of order i is not positive, then the routine returns with
info=i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. 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.
Parameters
infact'F': On entry, DF and EF contain the factored form of A. D, E, DF, and EF will not be modified.'N': The matrix A will be copied to DF and EF and factored.
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.inDArray of dimension
n. The n diagonal elements of the tridiagonal matrix A.inEComplex array of dimension
n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.inoutDFArray of dimension
n. Iffact='F', then DF is an input argument and on entry contains the n diagonal elements of the diagonal matrix D from the L*D*L**H factorization of A. Iffact='N', then DF is an output argument and on exit contains the n diagonal elements of the diagonal matrix D from the L*D*L**H factorization of A.inoutEFComplex array of dimension
n-1. Iffact='F', then EF is an input argument and on entry contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A. Iffact='N', then EF is an output argument and on exit contains the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A.inBComplex array of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXComplex array of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkComplex array of dimension
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.
void zptsvx(
const char* fact,
const INT n,
const INT nrhs,
const f64* restrict D,
const c128* restrict E,
f64* restrict DF,
c128* restrict EF,
const 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
);