1function x = cs_lusol (A,b,order,tol)                                       %#ok
2%CS_LUSOL solve Ax=b using LU factorization.
3%   x = cs_lusol(A,b) computes x = A\b, where A is sparse and square, and b is a
4%   full vector.  The ordering cs_amd(A,2) is used.
5%
6%   x = cs_lusol(A,b,1) also computes x = A\b, but uses the cs_amd(A) ordering
7%   with diagonal preference (tol=0.001).
8%
9%   x = cs_lusol(A,b,order,tol) allows both the ordering and tolerance to be
10%   defined.  The ordering defaults to 1, and tol defaults to 1.
11%   ordering: 0: natural, 1: amd(A+A'), 2: amd(S'*S) where S=A except with no
12%   dense rows, 3: amd(A'*A).
13%
14%   Example:
15%       Prob = ssget ('HB/arc130') ; A = Prob.A ; n = size(A,1) ;
16%       b = rand (n,1) ; x = cs_lusol (A,b) ; norm (A*x-b)
17%
18%   See also CS_LU, CS_AMD, CS_CHOLSOL, CS_QRSOL, MLDIVIDE.
19
20% Copyright 2006-2012, Timothy A. Davis, http://www.suitesparse.com
21
22error ('cs_lusol mexFunction not found') ;
23