gtsvx#
Functions
-
void sgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const f32 *restrict DL, const f32 *restrict D, const f32 *restrict DU, f32 *restrict DLF, f32 *restrict DF, f32 *restrict DUF, f32 *restrict DU2, INT *restrict ipiv, 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 *restrict iwork, INT *info)#
SGTSVX uses the LU factorization to compute the solution to a real system of linear equations.
where A is a tridiagonal matrix of orderA * X = B or A**T * X = B
nand X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the LU decomposition is used to factor the matrix A as A = L * U, where L is a product of permutation and unit lower bidiagonal matrices and U is upper triangular with nonzeros in only the main diagonal and first two superdiagonals.If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=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':DLF,DF,DUF,DU2, andipivcontain the factored form of A.'N': The matrix will be copied and factored.
intransSpecifies the form of the system of equations:
'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose = Transpose)
innThe order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inDLArray of dimension (
n-1). The (n-1) subdiagonal elements of A.inDArray of dimension (
n). The diagonal elements of A.inDUArray of dimension (
n-1). The (n-1) superdiagonal elements of A.inoutDLFArray of dimension (
n-1). Iffact='F', the (n-1) multipliers from LU factorization. Iffact='N', output.inoutDFArray of dimension (
n). Iffact='F', the n diagonal elements of U. Iffact='N', output.inoutDUFArray of dimension (
n-1). Iffact='F', the (n-1) elements of first superdiagonal of U. Iffact='N', output.inoutDU2Array of dimension (
n-2). Iffact='F', the (n-2) elements of second superdiagonal of U. Iffact='N', output.inoutipivArray of dimension (
n). Iffact='F', the pivot indices from factorization. Iffact='N', output.inBArray of dimension (
ldb,nrhs). Then-by-nrhsright hand side matrix.inldbThe leading dimension of
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Then-by-nrhssolution matrix.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondThe reciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bounds for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkWorkspace array of dimension (
3*n).outiworkInteger workspace array of dimension (
n).outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i(i <=n), U(i,i) is exactly zeroinfo=n+1: U is nonsingular, butrcond< machine precision
void sgtsvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
const f32* restrict DL,
const f32* restrict D,
const f32* restrict DU,
f32* restrict DLF,
f32* restrict DF,
f32* restrict DUF,
f32* restrict DU2,
INT* restrict ipiv,
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* restrict iwork,
INT* info
);
Functions
-
void dgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const f64 *restrict DL, const f64 *restrict D, const f64 *restrict DU, f64 *restrict DLF, f64 *restrict DF, f64 *restrict DUF, f64 *restrict DU2, INT *restrict ipiv, 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 *restrict iwork, INT *info)#
DGTSVX uses the LU factorization to compute the solution to a real system of linear equations.
where A is a tridiagonal matrix of orderA * X = B or A**T * X = B
nand X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the LU decomposition is used to factor the matrix A as A = L * U, where L is a product of permutation and unit lower bidiagonal matrices and U is upper triangular with nonzeros in only the main diagonal and first two superdiagonals.If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=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':DLF,DF,DUF,DU2, andipivcontain the factored form of A.'N': The matrix will be copied and factored.
intransSpecifies the form of the system of equations:
'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose = Transpose)
innThe order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inDLArray of dimension (
n-1). The (n-1) subdiagonal elements of A.inDArray of dimension (
n). The diagonal elements of A.inDUArray of dimension (
n-1). The (n-1) superdiagonal elements of A.inoutDLFArray of dimension (
n-1). Iffact='F', the (n-1) multipliers from LU factorization. Iffact='N', output.inoutDFArray of dimension (
n). Iffact='F', the n diagonal elements of U. Iffact='N', output.inoutDUFArray of dimension (
n-1). Iffact='F', the (n-1) elements of first superdiagonal of U. Iffact='N', output.inoutDU2Array of dimension (
n-2). Iffact='F', the (n-2) elements of second superdiagonal of U. Iffact='N', output.inoutipivArray of dimension (
n). Iffact='F', the pivot indices from factorization. Iffact='N', output.inBArray of dimension (
ldb,nrhs). Then-by-nrhsright hand side matrix.inldbThe leading dimension of
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Then-by-nrhssolution matrix.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondThe reciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bounds for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkWorkspace array of dimension (
3*n).outiworkInteger workspace array of dimension (
n).outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i(i <=n), U(i,i) is exactly zeroinfo=n+1: U is nonsingular, butrcond< machine precision
void dgtsvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
const f64* restrict DL,
const f64* restrict D,
const f64* restrict DU,
f64* restrict DLF,
f64* restrict DF,
f64* restrict DUF,
f64* restrict DU2,
INT* restrict ipiv,
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* restrict iwork,
INT* info
);
Functions
-
void cgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const c64 *restrict DL, const c64 *restrict D, const c64 *restrict DU, c64 *restrict DLF, c64 *restrict DF, c64 *restrict DUF, c64 *restrict DU2, INT *restrict ipiv, 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)#
CGTSVX uses the LU factorization to compute the solution to a complex system of linear equations.
where A is a tridiagonal matrix of orderA * X = B, A**T * X = B, or A**H * X = B
nand X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the LU decomposition is used to factor the matrix A as A = L * U, where L is a product of permutation and unit lower bidiagonal matrices and U is upper triangular with nonzeros in only the main diagonal and first two superdiagonals.If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=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':DLF,DF,DUF,DU2, andipivcontain the factored form of A.'N': The matrix will be copied and factored.
intransSpecifies the form of the system of equations:
'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose)
innThe order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inDLArray of dimension (
n-1). The (n-1) subdiagonal elements of A.inDArray of dimension (
n). The diagonal elements of A.inDUArray of dimension (
n-1). The (n-1) superdiagonal elements of A.inoutDLFArray of dimension (
n-1). Iffact='F', the (n-1) multipliers from LU factorization. Iffact='N', output.inoutDFArray of dimension (
n). Iffact='F', the n diagonal elements of U. Iffact='N', output.inoutDUFArray of dimension (
n-1). Iffact='F', the (n-1) elements of first superdiagonal of U. Iffact='N', output.inoutDU2Array of dimension (
n-2). Iffact='F', the (n-2) elements of second superdiagonal of U. Iffact='N', output.inoutipivArray of dimension (
n). Iffact='F', the pivot indices from factorization. Iffact='N', output.inBArray of dimension (
ldb,nrhs). Then-by-nrhsright hand side matrix.inldbThe leading dimension of
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Then-by-nrhssolution matrix.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondThe reciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bounds for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkComplex workspace array of dimension (
2*n).outrworkReal workspace array of dimension (
n).outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i(i <=n), U(i,i) is exactly zeroinfo=n+1: U is nonsingular, butrcond< machine precision
void cgtsvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
const c64* restrict DL,
const c64* restrict D,
const c64* restrict DU,
c64* restrict DLF,
c64* restrict DF,
c64* restrict DUF,
c64* restrict DU2,
INT* restrict ipiv,
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 zgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const c128 *restrict DL, const c128 *restrict D, const c128 *restrict DU, c128 *restrict DLF, c128 *restrict DF, c128 *restrict DUF, c128 *restrict DU2, INT *restrict ipiv, 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)#
ZGTSVX uses the LU factorization to compute the solution to a complex system of linear equations.
where A is a tridiagonal matrix of orderA * X = B, A**T * X = B, or A**H * X = B
nand X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='N', the LU decomposition is used to factor the matrix A as A = L * U, where L is a product of permutation and unit lower bidiagonal matrices and U is upper triangular with nonzeros in only the main diagonal and first two superdiagonals.If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=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':DLF,DF,DUF,DU2, andipivcontain the factored form of A.'N': The matrix will be copied and factored.
intransSpecifies the form of the system of equations:
'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose)
innThe order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inDLArray of dimension (
n-1). The (n-1) subdiagonal elements of A.inDArray of dimension (
n). The diagonal elements of A.inDUArray of dimension (
n-1). The (n-1) superdiagonal elements of A.inoutDLFArray of dimension (
n-1). Iffact='F', the (n-1) multipliers from LU factorization. Iffact='N', output.inoutDFArray of dimension (
n). Iffact='F', the n diagonal elements of U. Iffact='N', output.inoutDUFArray of dimension (
n-1). Iffact='F', the (n-1) elements of first superdiagonal of U. Iffact='N', output.inoutDU2Array of dimension (
n-2). Iffact='F', the (n-2) elements of second superdiagonal of U. Iffact='N', output.inoutipivArray of dimension (
n). Iffact='F', the pivot indices from factorization. Iffact='N', output.inBArray of dimension (
ldb,nrhs). Then-by-nrhsright hand side matrix.inldbThe leading dimension of
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Then-by-nrhssolution matrix.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondThe reciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bounds for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkComplex workspace array of dimension (
2*n).outrworkReal workspace array of dimension (
n).outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i(i <=n), U(i,i) is exactly zeroinfo=n+1: U is nonsingular, butrcond< machine precision
void zgtsvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
const c128* restrict DL,
const c128* restrict D,
const c128* restrict DU,
c128* restrict DLF,
c128* restrict DF,
c128* restrict DUF,
c128* restrict DU2,
INT* restrict ipiv,
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
);