|MATLAB Function Reference|
Column approximate minimum degree permutation
p = colamd(S)
returns the column approximate minimum degree permutation vector for the sparse matrix
S. For a non-symmetric matrix
S(:,p) tends to have sparser LU factors than
S. The Cholesky factorization of
S(:,p)' * S(:,p) also tends to be sparser than that of
knobs is a two-element vector. If S is
n, then rows with more than
(knobs(1))*n entries are ignored. Columns with more than
(knobs(2))*m entries are removed prior to ordering, and ordered last in the output permutation
p. If the
knobs parameter is not present, then
knobs(2) = spparms('wh_frac').
stats is an optional vector that provides data about the ordering and the validity of the matrix
||Number of dense or empty rows ignored by
||Number of dense or empty columns ignored by
||Number of garbage collections performed on the internal data structure used by
||Rightmost column index that is unsorted or contains duplicate entries, or
||Last seen duplicate or out-of-order row index in the column index given by
||Number of duplicate and out-of-order row indices
Although, MATLAB built-in functions generate valid sparse matrices, a user may construct an invalid sparse matrix using the MATLAB C or Fortran APIs and pass it to
colamd. For this reason,
colamd verifies that
S is valid:
colamdignores the duplicate entries, continues processing, and provides information about the duplicate entries in
colamdsorts each column of its internal copy of the matrix
S(but does not repair the input matrix
S), continues processing, and provides information about the out-of-order entries in
Sis invalid in any other way,
colamdcannot continue. It prints an error message, and returns no output arguments (
The ordering is followed by a column elimination tree post-ordering.
The Harwell-Boeing collection of sparse matrices and the MATLAB demos directory include a test matrix
west0479. It is a matrix of order 479 resulting from a model due to Westerberg of an eight-stage chemical distillation column. The spy plot shows evidence of the eight stages. The
colamd ordering scrambles this structure.
Comparing the spy plot of the LU factorization of the original matrix with that of the reordered matrix shows that minimum degree reduces the time and storage requirements by better than a factor of 2.8. The nonzero counts are 16777 and 5904, respectively.
 The authors of the code for
colamd are Stefan I. Larimore and Timothy A.
firstname.lastname@example.org), University of Florida. The algorithm was
developed in collaboration with John Gilbert, Xerox PARC, and Esmond Ng,
Oak Ridge National Laboratory. Sparse Matrix Algorithms Research at the
University of Florida: http://www.cise.ufl.edu/research/sparse/
© 1994-2005 The MathWorks, Inc.