1function [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, 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.suitesparse.com
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
48error ('csymamd: mexFunction not found') ;
49