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

« back to all changes in this revision

Viewing changes to CCOLAMD/MATLAB/csymamd.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 [p, stats] = csymamd (S, knobs, cmember)                           %#ok
 
2
%CSYMAMD constrained symmetric approximate minimum degree permutation
 
3
%    P = CSYMAMD(S) for a symmetric positive definite matrix S, returns the
 
4
%    permutation vector p such that S(p,p) tends to have a sparser Cholesky
 
5
%    factor than S.  Sometimes CSYMAMD works well for symmetric indefinite
 
6
%    matrices too.  The matrix S is assumed to be symmetric; only the
 
7
%    strictly lower triangular part is referenced.   S must be square.  Note
 
8
%    that p=amd(S) is faster, but does not allow for a constrained ordering.
 
9
%    The ordering is followed by an elimination tree post-ordering.
 
10
%
 
11
%    See also AMD, CCOLAMD, COLAMD, SYMAMD.
 
12
%
 
13
%    Example:
 
14
%            p = csymamd (S)
 
15
%            p = csymamd (S,knobs,cmember)
 
16
%
 
17
%    knobs is an optional one- to three-element input vector, with a default
 
18
%    value of [10 1 0] if present or empty ([ ]).  Entries not present are set
 
19
%    to their defaults.
 
20
%
 
21
%    knobs(1): If S is n-by-n, then rows and columns with more than
 
22
%       max(16,knobs(1)*sqrt(n)) entries are ignored, and ordered last in the
 
23
%       output permutation (subject to the cmember constraints).
 
24
%    knobs(2): if nonzero, aggressive absorption is performed.
 
25
%    knobs(3): if nonzero, statistics and knobs are printed.
 
26
%
 
27
%    cmember is an optional vector of length n.  It defines the constraints on
 
28
%    the ordering.  If cmember(j)=s, then row/column j is in constraint set s
 
29
%    (s must be in the range 1 to n).  In the output permutation p,
 
30
%    rows/columns in set 1 appear first, followed by all rows/columns in set 2,
 
31
%    and so on.  cmember=ones(1,n) if not present or empty.  csymamd(S,[],1:n)
 
32
%    returns 1:n.
 
33
%
 
34
%    p = csymamd(S) is about the same as p = symamd(S).  knobs and its default
 
35
%    values differ.
 
36
%
 
37
%    Authors: S. Larimore, T. Davis (Univ of Florida), and S. Rajamanickam, in
 
38
%    collaboration with J. Gilbert and E. Ng.  Supported by the National
 
39
%    Science Foundation (DMS-9504974, DMS-9803599, CCR-0203270), and a grant
 
40
%    from Sandia National Lab.  See http://www.cise.ufl.edu/research/sparse
 
41
%    for ccolamd, csymamd, amd, colamd, symamd, and other related orderings.
 
42
%
 
43
%    See also AMD, CCOLAMD, COLAMD, SYMAMD, SYMRCM.
 
44
 
 
45
% Copyright 1998-2007, Timothy A. Davis, Stefan Larimore, and Siva Rajamanickam
 
46
% Developed in collaboration with J. Gilbert and E. Ng.
 
47
 
 
48
error ('csymamd: mexFunction not found') ;