~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to LDL/MATLAB/ldldemo.out

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ldldemo
 
2
 LDLSPARSE LDL' factorization of a real, sparse, symmetric matrix
 
3
 
 
4
  Example:
 
5
        [L, D, Parent, fl] = ldlsparse (A)
 
6
        [L, D, Parent, fl] = ldlsparse (A, P)
 
7
        [x, fl] = ldlsparse (A, [ ], b)
 
8
        [x, fl] = ldlsparse (A, P, b)
 
9
 
 
10
  Let I = speye (size (A,1)). The factorization is (L+I)*D*(L+I)' = A or A(P,P).
 
11
  A must be sparse, square, and real.  Only the diagonal and upper triangular
 
12
  part of A or A(P,P) are accessed.  L is lower triangular with unit diagonal,
 
13
  but the diagonal is not returned.  D is a diagonal sparse matrix.  P is either
 
14
  a permutation of 1:n, or an empty vector, where n = size (A,1).  If not
 
15
  present, or empty, then P=1:n is assumed.  Parent is the elimination tree of
 
16
  A or A(P,P).  If positive, fl is the floating point operation count, or
 
17
  negative if any entry on the diagonal of D is zero.
 
18
 
 
19
  In the x = ldlsparse (A, P, b) usage, the LDL' factorization is not returned.
 
20
  Instead, the system A*x=b is solved for x, where both b and x are dense.
 
21
 
 
22
  If a zero entry on the diagonal of D is encountered, the LDL' factorization is
 
23
  terminated at that point.  If there is no fl output argument, an error occurs.
 
24
  Otherwise, fl is negative, and let d=-fl.  D(d,d) is the first zero entry on
 
25
  the diagonal of D.  A partial factorization is returned.  Let B = A, or A(P,P)
 
26
  if P is present.  Let F = (L+I)*D*(L+I)'.  Then F (1:d,1:d) = B (1:d,1:d).
 
27
  Rows d+1 to n of L and D are all zero.
 
28
 
 
29
  See also chol, ldl, ldlsymbol, symbfact, etree
 
30
 
 
31
 
 
32
Testing ldlsparse and ldlsymbol:
 
33
norm (LDL'-PAP') = 6.51562e-15
 
34
residual 3.55986e-15 for ldlsparse, flops    14813.0
 
35
residual 3.86691e-15 for ldlsparse solve
 
36
residual 3.64202e-15 for ldlrow.m
 
37
norm (LDL'-PAP') = 6.63575e-15
 
38
residual 2.96267e-15 for ldlsparse, flops    14813.0
 
39
residual 3.53833e-15 for ldlsparse solve
 
40
 
 
41
Original matrix: nz in L:  2206  flop count: 81044
 
42
Permuted matrix: nz in L:   893  flop count: 14813
 
43
 
 
44
ldldemo: all tests passed
 
45
diary off