23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2colamd<br />

Purpose Column approximate minimum degree permutation<br />

Syntax p = colamd(S)<br />

p = colamd(S,knobs)<br />

[p,stats] = colamd(S)<br />

[p,stats] = colamd(S,knobs)<br />

colamd<br />

Description p = colamd(S) returns the column approximate minimum degree<br />

permutation vector for the sparse matrix S. For a non-symmetric matrix S,<br />

S(:,p) tends to have sparser LU factors than S. The Cholesky factorization of<br />

S(:,p)' * S(:,p) also tends to be sparser than that of S'*S.<br />

knobs is a two-element vector. If S is m-by-n, then rows with more than<br />

(knobs(1))*n entries are ignored. Columns with more than (knobs(2))*m<br />

entries are removed prior to ordering, and ordered last in the output<br />

permutation p. If the knobs parameter is not present, then<br />

knobs(1) = knobs(2) = spparms('wh_frac').<br />

stats is an optional vector that provides data about the ordering and the<br />

validity of the matrix S.<br />

stats(1) Number of dense or empty rows ignored by colamd<br />

stats(2) Number of dense or empty columns ignored by colamd<br />

stats(3) Number of garbage collections performed on the internal data<br />

structure used by colamd (roughly of size<br />

2.2*nnz(S) + 4*m + 7*n integers)<br />

stats(4) 0 if the matrix is valid, or 1 if invalid<br />

stats(5) Rightmost column index that is unsorted or contains duplicate<br />

entries, or 0 if no such column exists<br />

stats(6) Last seen duplicate or out-of-order row index in the column<br />

index given by stats(5), or 0 if no such row index exists<br />

stats(7) Number of duplicate and out-of-order row indices<br />

Although, <strong>MATLAB</strong> built-in functions generate valid sparse matrices, a user<br />

may construct an invalid sparse matrix using the <strong>MATLAB</strong> C or Fortran APIs<br />

and pass it to colamd. For this reason, colamd verifies that S is valid:<br />

2-277

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!