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

« back to all changes in this revision

Viewing changes to CHOLMOD/MATLAB/cholmod.m

  • 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
 
function [x,stats] = cholmod (A, b, ordering)                               %#ok
2
 
%CHOLMOD: Supernodal sparse Cholesky backslash, x = A\b
3
 
%
4
 
%   x = cholmod (A,b)
5
 
%
6
 
%   Computes the LL' factorization of A(p,p), where p is a fill-reducing
7
 
%   ordering, then solves a sparse linear system Ax=b. A must be sparse,
8
 
%   symmetric, and positive definite).  Uses only the upper triangular part
9
 
%   of A.  A second output, [x,stats]=cholmod(A,b), returns statistics:
10
 
%
11
 
%       stats(1)    estimate of the reciprocal of the condition number
12
 
%       stats(2)    ordering used:
13
 
%                   0: natural, 1: given, 2:amd, 3:metis, 4:nesdis,
14
 
%                   5:colamd, 6: natural but postordered.
15
 
%       stats(3)    nnz(L)
16
 
%       stats(4)    flop count in Cholesky factorization.  Excludes solution
17
 
%                   of upper/lower triangular systems, which can be easily
18
 
%                   computed from stats(3) (roughly 4*nnz(L)*size(b,2)).
19
 
%       stats(5)    memory usage in MB.
20
 
%
21
 
%   The 3rd argument select the ordering method to use.  If not present or -1,
22
 
%   the default ordering strategy is used (AMD, and then try METIS if AMD finds
23
 
%   an ordering with high fill-in, and use the best method tried).
24
 
%
25
 
%   Other options for the ordering parameter:
26
 
%
27
 
%       0   natural (no etree postordering)
28
 
%       -1  use CHOLMOD's default ordering strategy (AMD, then try METIS)
29
 
%       -2  AMD, and then try NESDIS (not METIS) if AMD has high fill-in
30
 
%       -3  use AMD only
31
 
%       -4  use METIS only
32
 
%       -5  use NESDIS only
33
 
%       -6  natural, but with etree postordering
34
 
%       p   user permutation (vector of size n, with a permutation of 1:n)
35
 
%
36
 
%   See also CHOL, MLDIVIDE.
37
 
 
38
 
%   Copyright 2006, Timothy A. Davis
39
 
%   http://www.cise.ufl.edu/research/sparse
40
 
 
41
 
error ('cholmod mexFunction not found\n') ;