1function [p, stats] = ccolamd (S, knobs, cmember)			    %#ok
2%CCOLAMD constrained column approximate minimum degree permutation.
3%    p = CCOLAMD(S) returns the column approximate minimum degree permutation
4%    vector for the sparse matrix S.  For a non-symmetric matrix S, S(:,p)
5%    tends to have sparser LU factors than S.  chol(S(:,p)'*S(:,p)) also tends
6%    to be sparser than chol(S'*S).  p=ccolamd(S,1) optimizes the ordering for
7%    lu(S(:,p)).  The ordering is followed by a column elimination tree post-
8%    ordering.
9%
10%    Example:
11%            p = ccolamd (S)
12%            p = ccolamd (S,knobs,cmember)
13%
14%    knobs is an optional one- to five-element input vector, with a default
15%    value of [0 10 10 1 0] if not present or empty ([ ]).  Entries not present
16%    are set to their defaults.
17%
18%    knobs(1): if nonzero, the ordering is optimized for lu(S(:,p)).  It will
19%       be a poor ordering for chol(S(:,p)'*S(:,p)).  This is the most
20%       important knob for ccolamd.
21%    knobs(2): if S is m-by-n, rows with more than max(16,knobs(2)*sqrt(n))
22%       entries are ignored.
23%    knobs(3): columns with more than max(16,knobs(3)*sqrt(min(m,n))) entries
24%       are ignored and ordered last in the output permutation (subject to the
25%       cmember constraints).
26%    knobs(4): if nonzero, aggressive absorption is performed.
27%    knobs(5): if nonzero, statistics and knobs are printed.
28%
29%    cmember is an optional vector of length n.  It defines the constraints on
30%    the column ordering.  If cmember(j)=s, then column j is in constraint set
31%    s (s must be in the range 1 to n).  In the output permutation p, all
32%    columns in set 1 appear first, followed by all columns in set 2, and so
33%    on.  cmember=ones(1,n) if not present or empty.  ccolamd(S,[],1:n) returns
34%    1:n.
35%
36%    p = ccolamd(S) is about the same as p = colamd(S).  knobs and its default
37%    values differ.  colamd always does aggressive absorption, and it finds an
38%    ordering suitable for both lu(S(:,p)) and chol(S(:,p)'*S(:,p)); it cannot
39%    optimize its ordering for lu(S(:,p)) to the extent that ccolamd(S,1) can.
40%
41%    See also AMD, CSYMAMD, COLAMD, SYMAMD, SYMRCM.
42
43% Copyright 1998-2007, Timothy A. Davis, Stefan Larimore, and Siva Rajamanickam
44% Developed in collaboration with J. Gilbert and E. Ng.
45% Supported by the National Science Foundation (DMS-9504974, DMS-9803599,
46% CCR-0203270), and a grant from Sandia National Lab.
47
48error ('ccolamd: mexFunction not found') ;
49