File: cs_lu.m

package info (click to toggle)
suitesparse 1%3A5.12.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 176,720 kB
  • sloc: ansic: 1,193,914; cpp: 31,704; makefile: 6,638; fortran: 1,927; java: 1,826; csh: 765; ruby: 725; sh: 529; python: 333; perl: 225; sed: 164; awk: 35
file content (28 lines) | stat: -rw-r--r-- 1,297 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function [L,U,p,q] = cs_lu (A,tol)                                          %#ok
%CS_LU sparse LU factorization, with fill-reducing ordering.
%   [L,U,p] = cs_lu(A) factorizes A(p,:) into L*U using no fill-reducing
%   ordering.
%
%   [L,U,p] = cs_lu(A,tol) factorizes A(p,:) into L*U using no fill-reducing
%   ordering.  Entries on the diagonal are given preference in partial pivoting.
%
%   [L,U,p,q] = cs_lu(A) factorizes A(p,q) into L*U using a fill-reducing
%   ordering q = cs_amd(A,2).  Normal partial pivoting is used.
%
%   [L,U,p,q] = cs_lu(A,tol) factorizes A(p,q) into L*U, using a fill-reducing
%   ordering q = cs_amd(A,1).  Entries on the diagonal are given preference in
%   partial pivoting.  With a pivot tolerance tol, the entries in L have
%   magnitude 1/tol or less.  tol = 1 is normal partial pivoting (with
%   q = cs_amd(A)).  tol = 0 ensures p = q.  0<tol<1 is relaxed partial
%   pivoting; the diagonal is selected if it is >= tol * max(abs(A(:,k))).
%
%   Example:
%       Prob = ssget ('HB/arc130') ; A = Prob.A ; [L,U,p,q] = cs_lu (A) ;
%       cspy (A (p,q)) ; cspy (L+U) ;
%       norm (L*U - A(p,q), 1)
%
%   See also CS_AMD, LU, UMFPACK, AMD, COLAMD.

% Copyright 2006-2012, Timothy A. Davis, http://www.suitesparse.com

error ('cs_lu mexFunction not found') ;