2
/* cs_ltsolve: solve an upper triangular system L'*x=b */
8
const mxArray *pargin [ ]
11
if (nargout > 1 || nargin != 2)
13
mexErrMsgTxt ("Usage: x = cs_ltsolve(L,b)") ;
15
if (mxIsComplex (pargin [0]) || mxIsComplex (pargin [1]))
21
L = cs_cl_mex_get_sparse (&Lmatrix, 1, pargin [0]) ; /* get L */
22
x = cs_cl_mex_get_double (L->n, pargin [1]) ; /* x = b */
23
cs_cl_ltsolve (L, x) ; /* x = L'\x */
25
pargout [0] = cs_cl_mex_put_double (L->n, x) ; /* return x */
27
mexErrMsgTxt ("complex matrices not supported") ;
34
L = cs_dl_mex_get_sparse (&Lmatrix, 1, 1, pargin [0]) ; /* get L */
35
b = cs_dl_mex_get_double (L->n, pargin [1]) ; /* get b */
36
x = cs_dl_mex_put_double (L->n, b, &(pargout [0])) ; /* x = b */
37
cs_dl_ltsolve (L, x) ; /* x = L'\x */