* column-compressed matrix
* @return amd(A+A') if A is symmetric, or amd(A'A) otherwise, null on error
* or for natural ordering
*/
public static int[] cs_amd(int order, Dcs A) {
Dcs C, A2, AT;
int Cp[], Ci[], last[], W[], len[], nv[], next[], P[], head[], elen[], degree[], w[], hhead[], ATp[], ATi[], d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1, k2, k3, jlast, ln, dense, nzmax, mindeg = 0, nvi, nvj, nvk, mark, wnvi, cnz, nel = 0, p, p1, p2, p3, p4, pj, pk, pk1, pk2, pn, q, n, m, t;
int h;
boolean ok;
/* --- Construct matrix C ----------------------------------------------- */
if (!Dcs_util.CS_CSC(A) || order <= 0 || order > 3)