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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

>> ldltest
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.
err: 4.44089e16 fl: 61
err: 4.44089e16
err: 4.44089e16
err: 0
err: 5.68989e16
err: 5.68989e16 fl: 123
err: 4.57967e16 fl: 57
err: 4.57967e16
err: 4.57967e16
err: 0
err: 6.36644e16
err: 6.36644e16 fl: 119
ldl: all tests passed
>> diary off
