subroutine dtpsv ( uplo, trans, diag, n, ap, x, incx ) * .. scalar arguments .. integer incx, n character*1 diag, trans, uplo * .. array arguments .. double precision ap( * ), x( * ) * .. * * purpose * ======= * * dtpsv solves one of the systems of equations * * a*x = b, or a'*x = b, * * where b and x are n element vectors and a is an n by n unit, or * non-unit, upper or lower triangular matrix, supplied in packed form. * * no test for singularity or near-singularity is included in this * routine. such tests must be performed before calling this routine. * * parameters * ========== * * uplo - character*1. * on entry, uplo specifies whether the matrix is an upper or * lower triangular matrix as follows: * * uplo = 'u' or 'u' a is an upper triangular matrix. * * uplo = 'l' or 'l' a is a lower triangular matrix. * * unchanged on exit. * * trans - character*1. * on entry, trans specifies the equations to be solved as * follows: * * trans = 'n' or 'n' a*x = b. * * trans = 't' or 't' a'*x = b. * * trans = 'c' or 'c' a'*x = b. * * unchanged on exit. * * diag - character*1. * on entry, diag specifies whether or not a is unit * triangular as follows: * * diag = 'u' or 'u' a is assumed to be unit triangular. * * diag = 'n' or 'n' a is not assumed to be unit * triangular. * * unchanged on exit. * * n - integer. * on entry, n specifies the order of the matrix a. * n must be at least zero. * unchanged on exit. * * ap - double precision array of dimension at least * ( ( n*( n + 1 ) )/2 ). * before entry with uplo = 'u' or 'u', the array ap must * contain the upper triangular matrix packed sequentially, * column by column, so that ap( 1 ) contains a( 1, 1 ), * ap( 2 ) and ap( 3 ) contain a( 1, 2 ) and a( 2, 2 ) * respectively, and so on. * before entry with uplo = 'l' or 'l', the array ap must * contain the lower triangular matrix packed sequentially, * column by column, so that ap( 1 ) contains a( 1, 1 ), * ap( 2 ) and ap( 3 ) contain a( 2, 1 ) and a( 3, 1 ) * respectively, and so on. * note that when diag = 'u' or 'u', the diagonal elements of * a are not referenced, but are assumed to be unity. * unchanged on exit. * * x - double precision array of dimension at least * ( 1 + ( n - 1 )*abs( incx ) ). * before entry, the incremented array x must contain the n * element right-hand side vector b. on exit, x is overwritten * with the solution vector x. * * incx - integer. * on entry, incx specifies the increment for the elements of * x. incx must not be zero. * unchanged on exit. * * * level 2 blas routine. * * -- written on 22-october-1986. * jack dongarra, argonne national lab. * jeremy du croz, nag central office. * sven hammarling, nag central office. * richard hanson, sandia national labs. *