File: ldl.m

package info (click to toggle)
ufsparse 1.2-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,536 kB
  • ctags: 5,848
  • sloc: ansic: 89,328; makefile: 4,721; fortran: 1,991; csh: 207; sed: 162; awk: 33; java: 30; sh: 8
file content (35 lines) | stat: -rw-r--r-- 1,655 bytes parent folder | download
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
30
31
32
33
34
35
function [arg1, arg2, arg3, arg4] = ldl (A, P, b)
%
% LDL:  factorization of a real sparse symmetric matrix.
%
%	[L, D, Parent, fl] = ldl (A)
%	[L, D, Parent, fl] = ldl (A, P)
%	[x, fl] = ldl (A, [ ], b)
%	[x, fl] = ldl (A, P, b)
%
% Let I = speye (size (A,1)). The factorization is (L+I)*D*(L+I)' = A or A(P,P).
% A must be sparse, square, and real.  Only the diagonal and upper triangular
% part of A or A(P,P) are accessed.  L is lower triangular with unit diagonal,
% but the diagonal is not returned.  D is a diagonal sparse matrix.  P is either
% a permutation of 1:n, or an empty vector, where n = size (A,1).  If not
% present, or empty, then P=1:n is assumed.  Parent is the elimination tree of
% A or A(P,P).  If positive, fl is the floating point operation count, or
% negative if any entry on the diagonal of D is zero.
%
% In the x = ldl (A, P, b) usage, the LDL' factorization is not returned.
% Instead, the system A*x=b is solved for x, where both b and x are dense.
%
% If a zero entry on the diagonal of D is encountered, the LDL' factorization is
% terminated at that point.  If there is no fl output argument, an error occurs.
% Otherwise, fl is negative, and let d=-fl.  D(d,d) is the first zero entry on
% the diagonal of D.  A partial factorization is returned.  Let B = A, or A(P,P)
% if P is present.  Let F = (L+I)*D*(L+I)'.  Then F (1:d,1:d) = B (1:d,1:d).
% Rows d+1 to n of L and D are all zero.
%
% See also CHOL, LDLSYMBOL, SYMBFACT, ETREE
%
% LDL Version 1.2, Copyright (c) 2005 by Timothy A Davis,
% University of Florida.  All Rights Reserved.  See README for the License.

help ldl
error ('ldl mexFunction not found') ;