ptsv#

Functions

void sptsv(
    const INT           n,
    const INT           nrhs,
          f32* restrict D,
          f32* restrict E,
          f32* restrict B,
    const INT           ldb,
          INT*          info
);
void sptsv(const INT n, const INT nrhs, f32 *restrict D, f32 *restrict E, f32 *restrict B, const INT ldb, INT *info)#

SPTSV computes 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.

A is factored as A = L*D*L**T, and the factored form of A is then used to solve the system of equations.

Parameters

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 matrix B. nrhs >= 0.

inout
D

Double precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix A. On exit, the n diagonal elements of the diagonal matrix D from the factorization A = L*D*L**T.

inout
E

Double precision array, dimension (n-1). On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A. On exit, the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**T factorization of A. (E can also be regarded as the superdiagonal of the unit bidiagonal factor U from the U**T*D*U factorization of A.)

inout
B

Double precision array, dimension (ldb, nrhs). On entry, the N-by-NRHS right hand side matrix B. On exit, if info = 0, the N-by-NRHS solution matrix X.

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the leading principal minor of order i is not positive, and the solution has not been computed. The factorization has not been completed unless i = n.

Functions

void dptsv(
    const INT           n,
    const INT           nrhs,
          f64* restrict D,
          f64* restrict E,
          f64* restrict B,
    const INT           ldb,
          INT*          info
);
void dptsv(const INT n, const INT nrhs, f64 *restrict D, f64 *restrict E, f64 *restrict B, const INT ldb, INT *info)#

DPTSV computes 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.

A is factored as A = L*D*L**T, and the factored form of A is then used to solve the system of equations.

Parameters

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 matrix B. nrhs >= 0.

inout
D

Double precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix A. On exit, the n diagonal elements of the diagonal matrix D from the factorization A = L*D*L**T.

inout
E

Double precision array, dimension (n-1). On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A. On exit, the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**T factorization of A. (E can also be regarded as the superdiagonal of the unit bidiagonal factor U from the U**T*D*U factorization of A.)

inout
B

Double precision array, dimension (ldb, nrhs). On entry, the N-by-NRHS right hand side matrix B. On exit, if info = 0, the N-by-NRHS solution matrix X.

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the leading principal minor of order i is not positive, and the solution has not been computed. The factorization has not been completed unless i = n.

Functions

void cptsv(
    const INT           n,
    const INT           nrhs,
          f32* restrict D,
          c64* restrict E,
          c64* restrict B,
    const INT           ldb,
          INT*          info
);
void cptsv(const INT n, const INT nrhs, f32 *restrict D, c64 *restrict E, c64 *restrict B, const INT ldb, INT *info)#

CPTSV computes 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.

A is factored as A = L*D*L**H, and the factored form of A is then used to solve the system of equations.

Parameters

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 matrix B. nrhs >= 0.

inout
D

Single precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix A. On exit, the n diagonal elements of the diagonal matrix D from the factorization A = L*D*L**H.

inout
E

Single complex array, dimension (n-1). On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A. On exit, the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A. (E can also be regarded as the superdiagonal of the unit bidiagonal factor U from the U**H*D*U factorization of A.)

inout
B

Single complex array, dimension (ldb, nrhs). On entry, the N-by-NRHS right hand side matrix B. On exit, if info = 0, the N-by-NRHS solution matrix X.

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the leading principal minor of order i is not positive, and the solution has not been computed. The factorization has not been completed unless i = n.

Functions

void zptsv(
    const INT            n,
    const INT            nrhs,
          f64*  restrict D,
          c128* restrict E,
          c128* restrict B,
    const INT            ldb,
          INT*           info
);
void zptsv(const INT n, const INT nrhs, f64 *restrict D, c128 *restrict E, c128 *restrict B, const INT ldb, INT *info)#

ZPTSV computes 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.

A is factored as A = L*D*L**H, and the factored form of A is then used to solve the system of equations.

Parameters

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 matrix B. nrhs >= 0.

inout
D

Double precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix A. On exit, the n diagonal elements of the diagonal matrix D from the factorization A = L*D*L**H.

inout
E

Double complex array, dimension (n-1). On entry, the (n-1) subdiagonal elements of the tridiagonal matrix A. On exit, the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A. (E can also be regarded as the superdiagonal of the unit bidiagonal factor U from the U**H*D*U factorization of A.)

inout
B

Double complex array, dimension (ldb, nrhs). On entry, the N-by-NRHS right hand side matrix B. On exit, if info = 0, the N-by-NRHS solution matrix X.

in
ldb

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

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the leading principal minor of order i is not positive, and the solution has not been computed. The factorization has not been completed unless i = n.