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
);
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:

  1. 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.

  2. 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+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.

  3. The system of equations is solved for X using the factored form of A.

  4. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

Parameters

in
fact

  • '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.

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs>=0.

in
D

Array of dimension n. The n diagonal elements of the tridiagonal matrix A.

in
E

Array of dimension n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.

inout
DF

Array of dimension n. If fact='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. If fact='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.

inout
EF

Array of dimension n-1. If fact='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. If fact='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.

in
B

Array of dimension (ldb,nrhs). The n-by-nrhs right hand side matrix B.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
X

Array of dimension (ldx,nrhs). If info=0 or info=n+1, the n-by-nrhs solution matrix X.

in
ldx

The leading dimension of the array X. ldx>=max(1,n).

out
rcond

The reciprocal condition number of the matrix A. If rcond is less than the machine precision (in particular, if rcond=0), the matrix is singular to working precision. This condition is indicated by a return code of info>0.

out
ferr

Array of dimension nrhs. The forward error bound for each solution vector X(j).

out
berr

Array of dimension nrhs. The componentwise relative backward error of each solution vector X(j).

out
work

Array of dimension 2*n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, and i<=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=0 is returned.

  • info=n+1: U is nonsingular, but rcond is less than machine precision, meaning that the matrix is singular to working precision.

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
);
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:

  1. 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.

  2. 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+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.

  3. The system of equations is solved for X using the factored form of A.

  4. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

Parameters

in
fact

  • '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.

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs>=0.

in
D

Array of dimension n. The n diagonal elements of the tridiagonal matrix A.

in
E

Array of dimension n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.

inout
DF

Array of dimension n. If fact='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. If fact='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.

inout
EF

Array of dimension n-1. If fact='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. If fact='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.

in
B

Array of dimension (ldb,nrhs). The n-by-nrhs right hand side matrix B.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
X

Array of dimension (ldx,nrhs). If info=0 or info=n+1, the n-by-nrhs solution matrix X.

in
ldx

The leading dimension of the array X. ldx>=max(1,n).

out
rcond

The reciprocal condition number of the matrix A. If rcond is less than the machine precision (in particular, if rcond=0), the matrix is singular to working precision. This condition is indicated by a return code of info>0.

out
ferr

Array of dimension nrhs. The forward error bound for each solution vector X(j).

out
berr

Array of dimension nrhs. The componentwise relative backward error of each solution vector X(j).

out
work

Array of dimension 2*n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, and i<=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=0 is returned.

  • info=n+1: U is nonsingular, but rcond is less than machine precision, meaning that the matrix is singular to working precision.

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
);
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:

  1. 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.

  2. 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+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.

  3. The system of equations is solved for X using the factored form of A.

  4. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

Parameters

in
fact

  • '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.

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs>=0.

in
D

Array of dimension n. The n diagonal elements of the tridiagonal matrix A.

in
E

Complex array of dimension n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.

inout
DF

Array of dimension n. If fact='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. If fact='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.

inout
EF

Complex array of dimension n-1. If fact='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. If fact='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.

in
B

Complex array of dimension (ldb,nrhs). The n-by-nrhs right hand side matrix B.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
X

Complex array of dimension (ldx,nrhs). If info=0 or info=n+1, the n-by-nrhs solution matrix X.

in
ldx

The leading dimension of the array X. ldx>=max(1,n).

out
rcond

The reciprocal condition number of the matrix A. If rcond is less than the machine precision (in particular, if rcond=0), the matrix is singular to working precision. This condition is indicated by a return code of info>0.

out
ferr

Array of dimension nrhs. The forward error bound for each solution vector X(j).

out
berr

Array of dimension nrhs. The componentwise relative backward error of each solution vector X(j).

out
work

Complex array of dimension n.

out
rwork

Array of dimension n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, and i<=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=0 is returned.

  • info=n+1: U is nonsingular, but rcond is less than machine precision, meaning that the matrix is singular to working precision.

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
);
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:

  1. 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.

  2. 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+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.

  3. The system of equations is solved for X using the factored form of A.

  4. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

Parameters

in
fact

  • '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.

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides, i.e., the number of columns of the matrices B and X. nrhs>=0.

in
D

Array of dimension n. The n diagonal elements of the tridiagonal matrix A.

in
E

Complex array of dimension n-1. The (n-1) subdiagonal elements of the tridiagonal matrix A.

inout
DF

Array of dimension n. If fact='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. If fact='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.

inout
EF

Complex array of dimension n-1. If fact='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. If fact='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.

in
B

Complex array of dimension (ldb,nrhs). The n-by-nrhs right hand side matrix B.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
X

Complex array of dimension (ldx,nrhs). If info=0 or info=n+1, the n-by-nrhs solution matrix X.

in
ldx

The leading dimension of the array X. ldx>=max(1,n).

out
rcond

The reciprocal condition number of the matrix A. If rcond is less than the machine precision (in particular, if rcond=0), the matrix is singular to working precision. This condition is indicated by a return code of info>0.

out
ferr

Array of dimension nrhs. The forward error bound for each solution vector X(j).

out
berr

Array of dimension nrhs. The componentwise relative backward error of each solution vector X(j).

out
work

Complex array of dimension n.

out
rwork

Array of dimension n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, and i<=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=0 is returned.

  • info=n+1: U is nonsingular, but rcond is less than machine precision, meaning that the matrix is singular to working precision.