1function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) %#ok 2%UMFPACK2 computes x=A\b, x=A/b, or lu (A) for a sparse matrix A 3% It is also a built-in function in MATLAB, used in x=A\b. 4% 5% Example: 6% 7% UMFPACK: | MATLAB approximate equivalent: 8% --------------------------------------------------------------------- 9% x = umfpack (A, '\', b) ; | x = A \ b 10% | 11% x = umfpack (b, '/', A) ; | x = b / A 12% | 13% [L,U,P,Q] = umfpack (A) ; | [m,n] = size (A) ; 14% | I = speye (n) ; 15% | Q = I (:, colamd (A)) ; 16% | [L,U,P] = lu (A*Q) ; 17% | 18% [L,U,P,Q,R] = umfpack (A) ; | [m,n] = size (A) ; 19% | I = speye (n) ; 20% | Q = I (:, colamd (A)) ; 21% | r = full (sum (abs (A), 2)) ; 22% | r (find (r == 0)) = 1 ; 23% | R = spdiags (r, 0, m, m) ; 24% | [L,U,P] = lu ((R\A)*Q) ; 25% | 26% [P,Q,F,C] = umfpack (A, 'symbolic') | [m,n] = size (A) ; 27% | I = speye (n) ; 28% | Q = I (:, colamd (A)) ; 29% | [count,h,parent,post] = ... 30% | symbfact (A*Q, 'col') ; 31% 32% A must be sparse. It can be complex, singular, and/or rectangular. A must be 33% square for '/' or '\'. b must be a full real or complex vector. For 34% [L,U,P,Q,R] = umfpack (A), the factorization is L*U = P*(R\A)*Q. If A has a 35% mostly symmetric nonzero pattern, then replace "colamd" with "amd" in the 36% MATLAB-equivalent column in the table above. Type umfpack_details for more 37% information. 38% 39% An optional final input argument provides control parameters: 40% 41% opts.prl >= 0, default 1 (errors only) 42% opts.strategy 'auto', 'unsymmetric', 'symmetric', default auto 43% opts.ordering 'amd' AMD for A+A', COLAMD for A'A 44% 'default' use CHOLMOD (AMD then METIS; take best fount) 45% 'metis' use METIS 46% 'none' no fill-reducing ordering 47% 'given' use Qinit (this is default if Qinit present) 48% 'best' try AMD/COLAMD, METIS, and NESDIS; take best 49% opts.tol default 0.1 50% opts.symtol default 0.001 51% opts.scale row scaling: 'none', 'sum', 'max' 52% opts.irstep max # of steps of iterative refinement, default 2 53% opts.singletons 'enable','disable' default 'enable' 54% 55% An optional final output argument provides informational output, in a 56% struct whos contents are mostly self-explanatory. 57% 58% See also: lu_normest, colamd, amd, umfpack. 59% To use UMFPACK for an arbitrary b, see umfpack_solve. 60 61% Copyright 1995-2009 by Timothy A. Davis. 62 63help umfpack 64error ('umfpack mexFunction not found') ; 65 66