Triangular Computational APIs#
TRCON#
- group trcon
Functions
-
template<typename T>
void trcon(char *norm, char *uplo, char *diag, integer *n, T *a, integer *lda, T *rcond, T *work, integer *iwork, integer *info)# TRCON estimates the reciprocal of the condition number of a triangular matrix A.
Purpose:
TRCON estimates the reciprocal of the condition number of a triangular matrix A, in either the 1-norm or the infinity-norm. The norm of A is computed and an estimate is obtained for norm(inv(A)), then the reciprocal of the condition number is computed as RCOND = 1 / ( norm(A) * norm(inv(A))).
- Parameters:
NORM – [in]
NORM is CHARACTER*1
Specifies whether the 1-norm condition number or the infinity-norm condition number is required:
= ‘1’ or ‘O’: 1-norm;
= ‘I’: Infinity-norm.
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
A – [in]
A is REAL array, dimension (LDA,N)
The triangular matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading N-by-N lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. If DIAG = ‘U’, the diagonal elements of A are also not referenced and are assumed to be 1.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >= fla_max(1,N).
RCOND – [out]
RCOND is REAL
The reciprocal of the condition number of the matrix A, computed as RCOND = 1/(norm(A) * norm(inv(A))).
WORK – [out] WORK is REAL array, dimension (3*N)
IWORK – [out] IWORK is INTEGER array, dimension (N)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
-
template<typename T>
TRTRS#
- group trtrs
Functions
-
template<typename T>
void trtrs(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, T *a, integer *lda, T *b, integer *ldb, integer *info)# TRTRS solves a triangular system of the form A * X = B or A**T * X = B.
Purpose:
TRTRS solves a triangular system of the form A * X = B or A**T * X = B, where A is a triangular matrix of order N, and B is an N-by-NRHS matrix. A check is made to verify that A is nonsingular.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.TRANS – [in]
TRANS is CHARACTER*1
Specifies 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)DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
A – [in]
A is REAL array, dimension (LDA,N)
The triangular matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading N-by-N lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. If DIAG = ‘U’, the diagonal elements of A are also not referenced and are assumed to be 1.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >= fla_max(1,N).
B – [inout]
B is REAL array, dimension (LDB,NRHS)
On entry, the right hand side matrix B. On exit, if INFO = 0, the solution matrix X.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(1,N).
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, the i-th diagonal element of A is zero, indicating that the matrix is singular and the solutions X have not been computed.
-
template<typename T>
LATRS#
- group latrs
Functions
-
template<typename T>
void latrs(char *uplo, char *trans, char *diag, char *normin, integer *n, T *a, integer *lda, T *x, T *scale, T *cnorm, integer *info)# LATRS solves a triangular system of equations with the scale factor set to prevent overflow.
Purpose:
LATRS solves one of the triangular systems A *x = s*b or A**T*x = s*b with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the transpose of A, x and b are n-element vectors, and s is a scaling factor, usually less than or equal to 1, chosen so that the components of x will be less than the overflow threshold. If the unscaled problem will not cause overflow, the Level 2 BLAS routine STRSV is called. If the matrix A is singular (A(j,j) = 0 for some j), then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
Specifies whether the matrix A is upper or lower triangular.
= ‘U’: Upper triangular
= ‘L’: Lower triangular
TRANS – [in]
TRANS is CHARACTER*1
Specifies the operation applied to A.
= ‘N’: Solve A * x = s*b (No transpose)
= ‘T’: Solve A**T* x = s*b (Transpose)
= ‘C’: Solve A**T* x = s*b (Conjugate transpose = Transpose)DIAG – [in]
DIAG is CHARACTER*1
Specifies whether or not the matrix A is unit triangular.
= ‘N’: Non-unit triangular
= ‘U’: Unit triangular
NORMIN – [in]
NORMIN is CHARACTER*1
Specifies whether CNORM has been set or not.
= ‘Y’: CNORM contains the column norms on entry
= ‘N’: CNORM is not set on entry. On exit, the norms will be computed and stored in CNORM.
N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
A – [in]
A is REAL array, dimension (LDA,N)
The triangular matrix A. If UPLO = ‘U’, the leading n by n upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading n by n lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. If DIAG = ‘U’, the diagonal elements of A are also not referenced and are assumed to be 1.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >= max (1,N).
X – [inout]
X is REAL array, dimension (N)
On entry, the right hand side b of the triangular system. On exit, X is overwritten by the solution vector x.
SCALE – [out]
SCALE is REAL
The scaling factor s for the triangular system
A * x = s*b or A**T* x = s*b.
If SCALE = 0, the matrix A is singular or badly scaled, and the vector x is an exact or approximate solution to A*x = 0.
CNORM – [inout]
CNORM is REAL array, dimension (N)
If NORMIN = ‘Y’, CNORM is an input argument and CNORM(j) contains the norm of the off-diagonal part of the j-th column of A. If TRANS = ‘N’, CNORM(j) must be greater than or equal to the infinity-norm, and if TRANS = ‘T’ or ‘C’, CNORM(j) must be greater than or equal to the 1-norm.
If NORMIN = ‘N’, CNORM is an output argument and CNORM(j) returns the 1-norm of the offdiagonal part of the j-th column of A.INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -k, the k-th argument had an illegal value
-
template<typename T>
TRTRI#
- group trtri
Functions
-
template<typename T>
void trtri(char *uplo, char *diag, integer *n, T *a, integer *lda, integer *info)# Inverse of a real upper or lower triangular matrix.
Purpose:
Computation of inverse of a real upper or lower triangular matrix This is the Level 3 BLAS version of the algorithm.
- Parameters:
uplo – [in]
uplo is char*
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.diag – [in]
diag is char*
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.n – [in]
n is integer*
The order of the matrix a. n >= 0.
a – [inout]
a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)
On entry, the triangular matrix a. If uplo = ‘U’, the leading n-by-n upper triangular part of the array a contains the upper triangular matrix, and the strictly lower triangular part of a is not referenced. If uplo = ‘L’, the leading n-by-n lower triangular part of the array a contains the lower triangular matrix, and the strictly upper triangular part of a is not referenced. If diag = ‘U’, the diagonal elements of a are also not referenced and are assumed to be 1.
On exit, the (triangular) inverse of the original matrix, in the same storage format.lda – [in]
lda is integer*
The leading dimension of the matrix a, lda >= fla_max(1,n)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, A(i,i) is exactly zero. The triangular matrix is singular and its inverse can not be computed.
-
template<typename T>
TRTI2#
- group trti2
Functions
-
template<typename T>
void trti2(char *uplo, char *diag, integer *n, T *a, integer *lda, integer *info)# Inverse of a triangular matrix (unblocked algorithm).
Purpose:
Computation of inverse of a real upper or lower triangular matrix (unblocked algorithm) This is the Level 2 BLAS version of the algorithm.
- Parameters:
uplo – [in]
uplo is char*
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.diag – [in]
diag is char*
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.n – [in]
n is integer*
The order of the matrix a. n >= 0.
a – [inout]
a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)
On entry, the triangular matrix a. If uplo = ‘U’, the leading n by n upper triangular part of the array a contains the upper triangular matrix, and the strictly lower triangular part of a is not referenced. If uplo = ‘L’, the leading n by n lower triangular part of the array a contains the lower triangular matrix, and the strictly upper triangular part of a is not referenced. If diag = ‘U’, the diagonal elements of a are also not referenced and are assumed to be 1.
On exit, the (triangular) inverse of the original matrix, in the same storage format.lda – [in]
lda is integer*
The leading dimension of the matrix a, lda >= fla_max(1,n)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -k, the k-th argument had an illegal value
-
template<typename T>
TRRFS#
- group trrfs
Functions
-
template<typename T>
void trrfs(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, T *a, integer *lda, T *b, integer *ldb, T *x, integer *ldx, T *ferr, T *berr, T *work, integer *iwork, integer *info)# TRRFS provides error bounds and backward error estimates for the
solution to a system of linear equations.
Purpose:
TRRFS provides error bounds and backward error estimates for the solution to a system of linear equations with a triangular coefficient matrix. The solution matrix X must be computed by STRTRS or some other means before entering this routine. STRRFS does not do iterative refinement because doing so cannot improve the backward error.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.TRANS – [in]
TRANS is CHARACTER*1
Specifies 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)DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
A – [in]
A is REAL array, dimension (LDA,N)
The triangular matrix A. If UPLO = ‘U’, the leading N-by-N upper triangular part of the array A contains the upper triangular matrix, and the strictly lower triangular part of A is not referenced. If UPLO = ‘L’, the leading N-by-N lower triangular part of the array A contains the lower triangular matrix, and the strictly upper triangular part of A is not referenced. If DIAG = ‘U’, the diagonal elements of A are also not referenced and are assumed to be 1.
LDA – [in]
LDA is INTEGER
The leading dimension of the array A. LDA >= fla_max(1,N).
B – [in]
B is REAL array, dimension (LDB,NRHS)
The right hand side matrix B.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(1,N).
X – [in]
X is REAL array, dimension (LDX,NRHS)
The solution matrix X.
LDX – [in]
LDX is INTEGER
The leading dimension of the array X. LDX >= fla_max(1,N).
FERR – [out]
FERR is REAL array, dimension (NRHS)
The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error.
BERR – [out]
BERR is REAL array, dimension (NRHS)
The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
WORK – [out] WORK is REAL array, dimension (3*N)
IWORK – [out] IWORK is INTEGER array, dimension (N)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
-
template<typename T>
LAUUM#
- group lauum
Functions
-
template<typename T>
void lauum(char *uplo, integer *n, T *a, integer *lda, integer *info)# Product UUH or LHL, where U and L are upper or lower triangular matrices (blocked algorithm).
Purpose:
Product UUH or LHL, where U and L are upper or lower triangular matrices (blocked algorithm). Computation of the product U * U**T or L**T * L, where the triangular factor U or L is stored in the upper or lower triangular part of the array a. If uplo = 'U' or 'u' then the upper triangle of the result is stored, overwriting the factor U in A. If uplo = 'L' or 'l' then the lower triangle of the result is stored, overwriting the factor L in A. This is the blocked form of the algorithm, calling Level 3 BLAS.
- Parameters:
uplo – [in]
uplo is char*
Specifies whether the triangular factor stored in the array a is upper or lower triangular:
= ‘U’: Upper triangular
= ‘L’: Lower triangular
n – [in]
n is integer*
The order of the triangular factor U or L. n >= 0.
a – [inout]
a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)
On entry, the triangular factor U or L.
On exit, if uplo = ‘U’, the upper triangle of a is overwritten with the upper triangle of the product U * U**T;
if uplo = ‘L’, the lower triangle of a is overwritten with the lower triangle of the product L**T * L.
lda – [in]
lda is integer*
The leading dimension of the matrix a, lda >= fla_max(1,n)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -k, the k-th argument had an illegal value
-
template<typename T>
LAUU2#
- group lauu2
Functions
-
template<typename T>
void lauu2(char *uplo, integer *n, T *a, integer *lda, integer *info)# Product UUH or LHL, where U and L are upper or lower triangular matrices (unblocked algorithm).
Purpose:
Product UUH or LHL, where U and L are upper or lower triangular matrices (unblocked algorithm). Computation of the product U * U**T or L**T * L, where the triangular factor U or L is stored in the upper or lower triangular part of the array a. If uplo = 'U' or 'u' then the upper triangle of the result is stored, overwriting the factor U in A. If uplo = 'L' or 'l' then the lower triangle of the result is stored, overwriting the factor L in A. This is the unblocked form of the algorithm, calling Level 2 BLAS.
- Parameters:
uplo – [in]
uplo is char*
Specifies whether the triangular factor stored in the array a is upper or lower triangular:
= ‘U’: Upper triangular
= ‘L’: Lower triangular
n – [in]
n is integer*
The order of the triangular factor U or L. n >= 0.
a – [inout]
a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)
On entry, the triangular factor U or L.
On exit, if uplo = ‘U’, the Upper triangle of a is overwritten with the upper triangle of the product U * U**T;
if uplo = ‘L’, the lower triangle of a is overwritten with the lower triangle of the product L**T * L.
lda – [in]
lda is integer*
The leading dimension of the matrix a, lda >= fla_max(1,n)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -k, the k-th argument had an illegal value
-
template<typename T>
TPCON#
- group tpcon
Functions
-
template<typename T>
void tpcon(char *norm, char *uplo, char *diag, integer *n, T *ap, T *rcond, T *work, integer *iwork, integer *info)# TPCON estimates the reciprocal of the condition number of a packed triangular matrix A.
Purpose:
TPCON estimates the reciprocal of the condition number of a packed triangular matrix A, in either the 1-norm or the infinity-norm. The norm of A is computed and an estimate is obtained for norm(inv(A)), then the reciprocal of the condition number is computed as RCOND = 1 / ( norm(A) * norm(inv(A))).
- Parameters:
NORM – [in]
NORM is CHARACTER*1
Specifies whether the 1-norm condition number or the infinity-norm condition number is required:
= ‘1’ or ‘O’: 1-norm;
= ‘I’: Infinity-norm.
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
AP – [in]
AP is REAL array, dimension (N*(N+1)/2)
The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = ‘L’, AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
If DIAG = ‘U’, the diagonal elements of A are not referenced and are assumed to be 1.RCOND – [out]
RCOND is REAL
The reciprocal of the condition number of the matrix A, computed as RCOND = 1/(norm(A) * norm(inv(A))).
WORK – [out] WORK is REAL array, dimension (3*N)
IWORK – [out] IWORK is INTEGER array, dimension (N)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
-
template<typename T>
TPTRS#
- group tptrs
Functions
-
template<typename T>
void tptrs(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, T *ap, T *b, integer *ldb, integer *info)# TPTRS solves a triangular system of the form A * X = B or A**T * X = B.
Purpose:
TPTRS solves a triangular system of the form A * X = B or A**T * X = B, where A is a triangular matrix of order N stored in packed format, and B is an N-by-NRHS matrix. A check is made to verify that A is nonsingular.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.TRANS – [in]
TRANS is CHARACTER*1
Specifies 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)DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
AP – [in]
AP is REAL array, dimension (N*(N+1)/2)
The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
B – [inout]
B is REAL array, dimension (LDB,NRHS)
On entry, the right hand side matrix B. On exit, if INFO = 0, the solution matrix X.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(1,N).
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, the i-th diagonal element of A is zero, indicating that the matrix is singular and the solutions X have not been computed.
-
template<typename T>
LATPS#
- group latps
Functions
-
template<typename T>
void latps(char *uplo, char *trans, char *diag, char *normin, integer *n, T *ap, T *x, T *scale, T *cnorm, integer *info)# LATPS solves a triangular system of equations with the matrix held in packed storage.
Purpose:
LATPS solves one of the triangular systems A *x = s*b or A**T*x = s*b with scaling to prevent overflow, where A is an upper or lower triangular matrix stored in packed form. Here A**T denotes the transpose of A, x and b are n-element vectors, and s is a scaling factor, usually less than or equal to 1, chosen so that the components of x will be less than the overflow threshold. If the unscaled problem will not cause overflow, the Level 2 BLAS routine STPSV is called. If the matrix A is singular (A(j,j) = 0 for some j), then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
Specifies whether the matrix A is upper or lower triangular.
= ‘U’: Upper triangular
= ‘L’: Lower triangular
TRANS – [in]
TRANS is CHARACTER*1
Specifies the operation applied to A.
= ‘N’: Solve A * x = s*b (No transpose)
= ‘T’: Solve A**T* x = s*b (Transpose)
= ‘C’: Solve A**T* x = s*b (Conjugate transpose = Transpose)DIAG – [in]
DIAG is CHARACTER*1
Specifies whether or not the matrix A is unit triangular.
= ‘N’: Non-unit triangular
= ‘U’: Unit triangular
NORMIN – [in]
NORMIN is CHARACTER*1
Specifies whether CNORM has been set or not.
= ‘Y’: CNORM contains the column norms on entry
= ‘N’: CNORM is not set on entry. On exit, the norms will be computed and stored in CNORM.
N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
AP – [in]
AP is REAL array, dimension (N*(N+1)/2)
The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = ‘L’, AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
X – [inout]
X is REAL array, dimension (N)
On entry, the right hand side b of the triangular system. On exit, X is overwritten by the solution vector x.
SCALE – [out]
SCALE is REAL
The scaling factor s for the triangular system
A * x = s*b or A**T* x = s*b.
If SCALE = 0, the matrix A is singular or badly scaled, and the vector x is an exact or approximate solution to A*x = 0.
CNORM – [inout]
CNORM is REAL array, dimension (N)
If NORMIN = ‘Y’, CNORM is an input argument and CNORM(j) contains the norm of the off-diagonal part of the j-th column of A. If TRANS = ‘N’, CNORM(j) must be greater than or equal to the infinity-norm, and if TRANS = ‘T’ or ‘C’, CNORM(j) must be greater than or equal to the 1-norm.
If NORMIN = ‘N’, CNORM is an output argument and CNORM(j) returns the 1-norm of the offdiagonal part of the j-th column of A.INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -k, the k-th argument had an illegal value
-
template<typename T>
TPTRI#
- group tptri
Functions
-
template<typename T>
void tptri(char *uplo, char *diag, integer *n, T *ap, integer *info)# TPTRI computes the inverse of a real upper or lower triangular
matrix A.
Purpose:
TPTRI computes the inverse of a real upper or lower triangular matrix A stored in packed format.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
AP – [inout]
AP is REAL array, dimension (N*(N+1)/2)
On entry, the upper or lower triangular matrix A, stored columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = ‘L’, AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
See below for further details. On exit, the (triangular) inverse of the original matrix, in the same packed storage format.INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, A(i,i) is exactly zero. The triangular matrix is singular and its inverse can not be computed.
-
template<typename T>
TPRFS#
- group tprfs
Functions
-
template<typename T>
void tprfs(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, T *ap, T *b, integer *ldb, T *x, integer *ldx, T *ferr, T *berr, T *work, integer *iwork, integer *info)# TPRFS provides error bounds and backward error estimates
for the solution to a system of linear equations.
Purpose:
TPRFS provides error bounds and backward error estimates for the solution to a system of linear equations with a triangular packed coefficient matrix. The solution matrix X must be computed by STPTRS or some other means before entering this routine. STPRFS does not do iterative refinement because doing so cannot improve the backward error.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.TRANS – [in]
TRANS is CHARACTER*1
Specifies 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)DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
AP – [in]
AP is REAL array, dimension (N*(N+1)/2)
The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
if UPLO = ‘U’, AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = ‘L’, AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
If DIAG = ‘U’, the diagonal elements of A are not referenced and are assumed to be 1.B – [in]
B is REAL array, dimension (LDB,NRHS)
The right hand side matrix B.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(1,N).
X – [in]
X is REAL array, dimension (LDX,NRHS)
The solution matrix X.
LDX – [in]
LDX is INTEGER
The leading dimension of the array X. LDX >= fla_max(1,N).
FERR – [out]
FERR is REAL array, dimension (NRHS)
The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X).
If XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error.BERR – [out]
BERR is REAL array, dimension (NRHS)
The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
WORK – [out] WORK is REAL array, dimension (3*N)
IWORK – [out] IWORK is INTEGER array, dimension (N)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
-
template<typename T>
TFTRI#
- group tftri
Functions
-
template<typename T>
void tftri(char *transr, char *uplo, char *diag, integer *n, T *a, integer *info)# TFTRI computes the inverse of a triangular matrix A stored in RFP format.
Purpose:
TFTRI computes the inverse of a triangular matrix A stored in RFP format. This is a Level 3 BLAS version of the algorithm.
- Parameters:
TRANSR – [in]
TRANSR is CHARACTER*1
= ‘N’: The Normal TRANSR of RFP A is stored;
= ‘T’: The Transpose TRANSR of RFP A is stored.UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
A – [inout]
A is REAL array, dimension (NT);
NT=N*(N+1)/2. On entry, the triangular factor of a Hermitian Positive Definite matrix A in RFP format. RFP format is described by TRANSR, UPLO, and N as follows: If TRANSR = ‘N’ then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = ‘T’ then RFP is the transpose of RFP A as defined when TRANSR = ‘N’. The contents of RFP A are defined by UPLO as follows: If UPLO = ‘U’ the RFP A contains the nt elements of upper packed A; If UPLO = ‘L’ the RFP A contains the nt elements of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR = ‘T’. When TRANSR is ‘N’ the LDA is N+1 when N is even and N is odd. See the Note below for more details.
On exit, the (triangular) inverse of the original matrix, in the same storage format.INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, A(i,i) is exactly zero. The triangular matrix is singular and its inverse can not be computed.
-
template<typename T>
TBCON#
- group tbcon
Functions
-
template<typename T>
void tbcon(char *norm, char *uplo, char *diag, integer *n, integer *kd, T *ab, integer *ldab, T *rcond, T *work, integer *iwork, integer *info)# TBCON estimates the reciprocal of the condition number of a
triangular band matrix A.
Purpose:
TBCON estimates the reciprocal of the condition number of a triangular band matrix A, in either the 1-norm or the infinity-norm. The norm of A is computed and an estimate is obtained for norm(inv(A)), then the reciprocal of the condition number is computed as RCOND = 1 / ( norm(A) * norm(inv(A))).
- Parameters:
NORM – [in]
NORM is CHARACTER*1
Specifies whether the 1-norm condition number or the infinity-norm condition number is required:
= ‘1’ or ‘O’: 1-norm;
= ‘I’: Infinity-norm.
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
KD – [in]
KD is INTEGER
The number of superdiagonals or subdiagonals of the triangular band matrix A. KD >= 0.
AB – [in]
AB is REAL array, dimension (LDAB,N)
The upper or lower triangular band matrix A, stored in the first kd+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;
if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
If DIAG = ‘U’, the diagonal elements of A are not referenced and are assumed to be 1.LDAB – [in]
LDAB is INTEGER
The leading dimension of the array AB. LDAB >= KD+1.
RCOND – [out]
RCOND is REAL
The reciprocal of the condition number of the matrix A, computed as RCOND = 1/(norm(A) * norm(inv(A))).
WORK – [out] WORK is REAL array, dimension (3*N)
IWORK – [out] IWORK is INTEGER array, dimension (N)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
-
template<typename T>
TBTRS#
- group tbtrs
Functions
-
template<typename T>
void tbtrs(char *uplo, char *trans, char *diag, integer *n, integer *kd, integer *nrhs, T *ab, integer *ldab, T *b, integer *ldb, integer *info)# TBTRS solves a triangular system of the form A * X = B or A**T * X = B.
Purpose:
TBTRS solves a triangular system of the form A * X = B or A**T * X = B, where A is a triangular band matrix of order N, and B is an N-by NRHS matrix. A check is made to verify that A is nonsingular.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.TRANS – [in]
TRANS is CHARACTER*1
Specifies the form the system of equations:
= ‘N’: A * X = B (No transpose)
= ‘T’: A**T * X = B (Transpose)
= ‘C’: A**H * X = B (Conjugate transpose = Transpose)DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
KD – [in]
KD is INTEGER
The number of superdiagonals or subdiagonals of the triangular band matrix A. KD >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
AB – [in]
AB is REAL array, dimension (LDAB,N)
The upper or lower triangular band matrix A, stored in the first kd+1 rows of AB. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;
if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
If DIAG = ‘U’, the diagonal elements of A are not referenced and are assumed to be 1.LDAB – [in]
LDAB is INTEGER
The leading dimension of the array AB. LDAB >= KD+1.
B – [inout]
B is REAL array, dimension (LDB,NRHS)
On entry, the right hand side matrix B. On exit, if INFO = 0, the solution matrix X.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(1,N).
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, the i-th diagonal element of A is zero, indicating that the matrix is singular and the solutions X have not been computed.
-
template<typename T>
LATBS#
- group latbs
Functions
-
template<typename T>
void latbs(char *uplo, char *trans, char *diag, char *normin, integer *n, integer *kd, T *ab, integer *ldab, T *x, T *scale, T *cnorm, integer *info)# LATBS solves a triangular banded system of equations.
Purpose:
LATBS solves one of the triangular systems A *x = s*b or A**T*x = s*b with scaling to prevent overflow, where A is an upper or lower triangular band matrix. Here A**T denotes the transpose of A, x and b are n-element vectors, and s is a scaling factor, usually less than or equal to 1, chosen so that the components of x will be less than the overflow threshold. If the unscaled problem will not cause overflow, the Level 2 BLAS routine STBSV is called. If the matrix A is singular (A(j,j) = 0 for some j), then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
Specifies whether the matrix A is upper or lower triangular.
= ‘U’: Upper triangular
= ‘L’: Lower triangular
TRANS – [in]
TRANS is CHARACTER*1
Specifies the operation applied to A.
= ‘N’: Solve A * x = s*b (No transpose)
= ‘T’: Solve A**T* x = s*b (Transpose)
= ‘C’: Solve A**T* x = s*b (Conjugate transpose = Transpose)DIAG – [in]
DIAG is CHARACTER*1
Specifies whether or not the matrix A is unit triangular.
= ‘N’: Non-unit triangular
= ‘U’: Unit triangular
NORMIN – [in]
NORMIN is CHARACTER*1
Specifies whether CNORM has been set or not.
= ‘Y’: CNORM contains the column norms on entry
= ‘N’: CNORM is not set on entry. On exit, the norms will be computed and stored in CNORM.
N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
KD – [in]
KD is INTEGER
The number of subdiagonals or superdiagonals in the triangular matrix A. KD >= 0.
AB – [in]
AB is REAL array, dimension (LDAB,N)
The upper or lower triangular band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;
if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
LDAB – [in]
LDAB is INTEGER
The leading dimension of the array AB. LDAB >= KD+1.
X – [inout]
X is REAL array, dimension (N)
On entry, the right hand side b of the triangular system. On exit, X is overwritten by the solution vector x.
SCALE – [out]
SCALE is REAL
The scaling factor s for the triangular system
A * x = s*b or A**T* x = s*b.
If SCALE = 0, the matrix A is singular or badly scaled, and the vector x is an exact or approximate solution to A*x = 0.
CNORM – [inout]
CNORM is REAL array, dimension (N)
If NORMIN = ‘Y’, CNORM is an input argument and CNORM(j) contains the norm of the off-diagonal part of the j-th column of A. If TRANS = ‘N’, CNORM(j) must be greater than or equal to the infinity-norm, and if TRANS = ‘T’ or ‘C’, CNORM(j) must be greater than or equal to the 1-norm.
If NORMIN = ‘N’, CNORM is an output argument and CNORM(j) returns the 1-norm of the offdiagonal part of the j-th column of A.INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -k, the k-th argument had an illegal value
-
template<typename T>
TBRFS#
- group tbrfs
Functions
-
template<typename T>
void tbrfs(char *uplo, char *trans, char *diag, integer *n, integer *kd, integer *nrhs, T *ab, integer *ldab, T *b, integer *ldb, T *x, integer *ldx, T *ferr, T *berr, T *work, integer *iwork, integer *info)# TBRFS provides error bounds and backward error estimates for the
solution to a system of linear equations.
Purpose:
TBRFS provides error bounds and backward error estimates for the solution to a system of linear equations with a triangular band coefficient matrix. The solution matrix X must be computed by STBTRS or some other means before entering this routine. STBRFS does not do iterative refinement because doing so cannot improve the backward error.
- Parameters:
UPLO – [in]
UPLO is CHARACTER*1
= ‘U’: A is upper triangular;
= ‘L’: A is lower triangular.TRANS – [in]
TRANS is CHARACTER*1
Specifies 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)DIAG – [in]
DIAG is CHARACTER*1
= ‘N’: A is non-unit triangular;
= ‘U’: A is unit triangular.N – [in]
N is INTEGER
The order of the matrix A. N >= 0.
KD – [in]
KD is INTEGER
The number of superdiagonals or subdiagonals of the triangular band matrix A. KD >= 0.
NRHS – [in]
NRHS is INTEGER
The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
AB – [in]
AB is REAL array, dimension (LDAB,N)
The upper or lower triangular band matrix A, stored in the first kd+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = ‘U’, AB(kd+1+i-j,j) = A(i,j) for fla_max(1,j-kd)<=i<=j;
if UPLO = ‘L’, AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
If DIAG = ‘U’, the diagonal elements of A are not referenced and are assumed to be 1.LDAB – [in]
LDAB is INTEGER
The leading dimension of the array AB. LDAB >= KD+1.
B – [in]
B is REAL array, dimension (LDB,NRHS)
The right hand side matrix B.
LDB – [in]
LDB is INTEGER
The leading dimension of the array B. LDB >= fla_max(1,N).
X – [in]
X is REAL array, dimension (LDX,NRHS)
The solution matrix X.
LDX – [in]
LDX is INTEGER
The leading dimension of the array X. LDX >= fla_max(1,N).
FERR – [out]
FERR is REAL array, dimension (NRHS)
The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X).
If XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error.BERR – [out]
BERR is REAL array, dimension (NRHS)
The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
WORK – [out] WORK is REAL array, dimension (3*N)
IWORK – [out] IWORK is INTEGER array, dimension (N)
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
-
template<typename T>