3 /* Written by Andrew Makhorin <mao@gnu.org>. */
11 #define COLAMD_DATE "Nov 1, 2007"
12 #define COLAMD_VERSION_CODE(main, sub) ((main) * 1000 + (sub))
13 #define COLAMD_MAIN_VERSION 2
14 #define COLAMD_SUB_VERSION 7
15 #define COLAMD_SUBSUB_VERSION 1
16 #define COLAMD_VERSION \
17 COLAMD_VERSION_CODE(COLAMD_MAIN_VERSION, COLAMD_SUB_VERSION)
19 #define COLAMD_KNOBS 20
20 #define COLAMD_STATS 20
21 #define COLAMD_DENSE_ROW 0
22 #define COLAMD_DENSE_COL 1
23 #define COLAMD_AGGRESSIVE 2
24 #define COLAMD_DEFRAG_COUNT 2
25 #define COLAMD_STATUS 3
26 #define COLAMD_INFO1 4
27 #define COLAMD_INFO2 5
28 #define COLAMD_INFO3 6
31 #define COLAMD_OK_BUT_JUMBLED (1)
32 #define COLAMD_ERROR_A_not_present (-1)
33 #define COLAMD_ERROR_p_not_present (-2)
34 #define COLAMD_ERROR_nrow_negative (-3)
35 #define COLAMD_ERROR_ncol_negative (-4)
36 #define COLAMD_ERROR_nnz_negative (-5)
37 #define COLAMD_ERROR_p0_nonzero (-6)
38 #define COLAMD_ERROR_A_too_small (-7)
39 #define COLAMD_ERROR_col_length_negative (-8)
40 #define COLAMD_ERROR_row_index_out_of_bounds (-9)
41 #define COLAMD_ERROR_out_of_memory (-10)
42 #define COLAMD_ERROR_internal_error (-999)
44 #define colamd_recommended _glp_colamd_recommended
45 size_t colamd_recommended(int nnz, int n_row, int n_col);
47 #define colamd_set_defaults _glp_colamd_set_defaults
48 void colamd_set_defaults(double knobs [COLAMD_KNOBS]);
50 #define colamd _glp_colamd
51 int colamd(int n_row, int n_col, int Alen, int A[], int p[],
52 double knobs[COLAMD_KNOBS], int stats[COLAMD_STATS]);
54 #define symamd _glp_symamd
55 int symamd(int n, int A[], int p[], int perm[],
56 double knobs[COLAMD_KNOBS], int stats[COLAMD_STATS],
57 void *(*allocate)(size_t, size_t), void(*release)(void *));
59 #define colamd_report _glp_colamd_report
60 void colamd_report(int stats[COLAMD_STATS]);
62 #define symamd_report _glp_symamd_report
63 void symamd_report(int stats[COLAMD_STATS]);
65 #define colamd_printf xprintf