File: cs_lu.m

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 254,920 kB
  • sloc: ansic: 1,134,743; cpp: 46,133; makefile: 4,875; fortran: 2,087; java: 1,826; sh: 996; ruby: 725; python: 495; asm: 371; sed: 166; awk: 44
file content (29 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download | duplicates (2)
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
29
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.

% CXSparse, Copyright (c) 2006-2022, Timothy A. Davis. All Rights Reserved.
% SPDX-License-Identifier: LGPL-2.1+

error ('cs_lu mexFunction not found') ;