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

« back to all changes in this revision

Viewing changes to CCOLAMD/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)
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
 
%    Usage:  p = csymamd(S)
14
 
%            [p stats] = csymamd(S,knobs,cmember)
15
 
%
16
 
%    knobs is an optional one- to three-element input vector, with a default
17
 
%    value of [10 1 0] if present or empty ([ ]).  Entries not present are set
18
 
%    to their defaults.
19
 
%
20
 
%    knobs(1): If S is n-by-n, then rows and columns with more than
21
 
%       max(16,knobs(1)*sqrt(n)) entries are ignored, and ordered last in the
22
 
%       output permutation (subject to the cmember constraints).
23
 
%    knobs(2): if nonzero, aggressive absorption is performed.
24
 
%    knobs(3): if nonzero, statistics and knobs are printed.
25
 
%
26
 
%    Type the command "type csymamd" for a description of the optional stats
27
 
%    output.
28
 
%
29
 
%    cmember is an optional vector of length n.  It defines the constraints on
30
 
%    the ordering.  If cmember(j)=s, then row/column j is in constraint set s
31
 
%    (s must be in the range 1 to n).  In the output permutation p,
32
 
%    rows/columns in set 1 appear first, followed by all rows/columns in set 2,
33
 
%    and so on.  cmember=ones(1,n) if not present or empty.  csymamd(S,[],1:n)
34
 
%    returns 1:n.
35
 
%
36
 
%    p = csymamd(S) is about the same as p = symamd(S).  knobs and its default
37
 
%    values differ.
38
 
%
39
 
%    Authors: S. Larimore, T. Davis (Univ of Florida), and S. Rajamanickam, in
40
 
%    collaboration with J. Gilbert and E. Ng.  Supported by the National
41
 
%    Science Foundation (DMS-9504974, DMS-9803599, CCR-0203270), and a grant
42
 
%    from Sandia National Lab.  See http://www.cise.ufl.edu/research/sparse
43
 
%    for ccolamd, csymamd, amd, colamd, symamd, and other related orderings.
44
 
%
45
 
%    See also AMD, CCOLAMD, COLAMD, SYMAMD, SYMRCM.
46
 
 
47
 
% ----------------------------------------------------------------------------
48
 
% CCOLAMD version 2.5.
49
 
% Copyright (C) 2005, Univ. of Florida.  Authors: Timothy A. Davis,
50
 
% Sivasankaran Rajamanickam, and Stefan Larimore
51
 
% See License.txt for the Version 2.1 of the GNU Lesser General Public License
52
 
% http://www.cise.ufl.edu/research/sparse
53
 
% ----------------------------------------------------------------------------
54
 
 
55
 
%    stats(1): number of dense or empty rows removed prior to ordering
56
 
%    stats(2): number of dense or empty columns removed prior to ordering.
57
 
%       These rows and columns are placed last in their constraint set.
58
 
%    stats(3): number of garbage collections performed.
59
 
%    stats (4:7) provide information if COLAMD was able to continue.  The
60
 
%    matrix is OK if stats (4) is zero, or 1 if invalid.  stats (5) is the
61
 
%    rightmost column index that is unsorted or contains duplicate entries,
62
 
%    or zero if no such column exists.  stats (6) is the last seen duplicate
63
 
%    or out-of-order row index in the column index given by stats (5), or zero
64
 
%    if no such row index exists.  stats (7) is the number of duplicate or
65
 
%    out-of-order row indices.
66
 
%
67
 
%    stats (8:20) is always zero in the current version of COLAMD (reserved
68
 
%    for future use).
69
 
 
70
 
error ('csymamd: mexFunction not found') ;