Skip to main content

colamd

Function colamd 

Source
pub fn colamd(a: &CsrMatrix) -> Vec<usize>
Expand description

A column ordering of A that approximately minimises the fill of the Cholesky factor of AᵀA, and so bounds the fill of the LU factors of A Q under any row pivoting (SciPy’s COLAMD).

The rows of A start as elements, the cliques they create in the graph of AᵀA. Eliminating a column merges the elements that contain it into one new element; the degree of a column is then bounded by the sizes of the elements it belongs to, without forming any clique. Elements contained in a new element are absorbed, and columns with identical patterns are merged into one weighted supercolumn and eliminated together. Rows and columns with more than max(16, 10 √n) entries are ignored (dense columns are placed last), as in the reference implementation.

Returns q with q[k] the original column placed at position k; q has length ncols.