CXML
strsv, dtrsv, ctrsv, ztrsv
Solver of a system of linear equations with a
triangular matrix
FORMAT
{S,D,C,Z}TRSV (uplo, trans, diag, n, a, lda, x, incx)
Arguments
uplo character*1
On entry, specifies whether the matrix A is an upper-
or lower-triangular matrix:
If uplo = 'U' or 'u', A is an upper-triangular matrix.
If uplo = 'L' or
On exit, uplo is unchanged.
trans character*1
On entry, specifies the system to be solved:
If trans = 'N' or 'n', the system is Ax = b.
If trans = 'T' or 't', the system is transp(A)*x = b.
If trans = 'C' or 'c', the system is conjug_transp(A)*x
= b.
On exit, trans is unchanged.
diag character*1
On entry, specifies whether the matrix A is unit-
triangular:
If diag = 'U' or 'u', A is a unit-triangular matrix.
If diag = 'N' or 'n', A is not a unit-triangular
matrix.
On exit, diag is unchanged.
n integer*4
On entry, the order of the matrix A; n >= 0.
On exit, n is unchanged.
a real*4 | real*8 | complex*8 | complex*16
On entry, a two-dimensional array with dimensions lda
by n.
When uplo specifies the upper portion of the matrix, the leading n by n
part of the array contains the upper-triangular part of the matrix, and the
lower-triangular part of array A is not referenced.
When uplo specifies the lower portion of the matrix, the leading n by n
part of the array contains the lower-triangular part of the matrix, and the
upper-triangular part of array A is not referenced.
If diag is equal to 'U' or 'u', the diagonal elements of A are also not
referenced, but are assumed to be unity.
On exit, a is unchanged.
lda integer*4
On entry, the first dimension of array A; lda >=
MAX(1,n).
On exit, lda is unchanged.
x real*4 | real*8 | complex*8 | complex*16
On entry, a one-dimensional array X of length at least
(1+(n-1)*|incx|). Array X contains the vector b.
On exit, x is overwritten with the solution vector x.
incx integer*4
On entry, the increment for the elements of X; incx
must not equal zero.
On exit, incx is unchanged.
Description
The _TRSV subprograms solve one of the following systems of linear
equations for x: Ax = b or transp(A)*x = b . In addition to these
operations, the CTRSV and ZTRSV subprograms solve the following systems of
linear equation: conjug_transp(A)*x = b .
b and x are vectors with n elements and A is an n by n, unit or non-unit,
upper- or lower-triangular matrix.
The _TRSV routines do not perform checks for singularity or near
singularity of the triangular matrix. The requirements for such a test
depend on the application. If necessary, perform the test in your
application program before calling this routine.
Example
REAL*8 A(100,40), X(40)
INCX = 1
N = 40
LDA = 100
CALL DTRSV('L','N','U',N,A,LDA,X,INCX)
This FORTRAN code solves the system Ax=b where A is a lower-triangular
matrix of order 40, with a unit diagonal. The right hand side b is
originally stored in the vector x.
CXML Home Page Index of CXML Routines