alpar@1: /* colamd.h */ alpar@1: alpar@1: /* Written by Andrew Makhorin . */ alpar@1: alpar@1: #ifndef COLAMD_H alpar@1: #define COLAMD_H alpar@1: alpar@1: #define _GLPSTD_STDIO alpar@1: #include "glpenv.h" alpar@1: alpar@1: #define COLAMD_DATE "Nov 1, 2007" alpar@1: #define COLAMD_VERSION_CODE(main, sub) ((main) * 1000 + (sub)) alpar@1: #define COLAMD_MAIN_VERSION 2 alpar@1: #define COLAMD_SUB_VERSION 7 alpar@1: #define COLAMD_SUBSUB_VERSION 1 alpar@1: #define COLAMD_VERSION \ alpar@1: COLAMD_VERSION_CODE(COLAMD_MAIN_VERSION, COLAMD_SUB_VERSION) alpar@1: alpar@1: #define COLAMD_KNOBS 20 alpar@1: #define COLAMD_STATS 20 alpar@1: #define COLAMD_DENSE_ROW 0 alpar@1: #define COLAMD_DENSE_COL 1 alpar@1: #define COLAMD_AGGRESSIVE 2 alpar@1: #define COLAMD_DEFRAG_COUNT 2 alpar@1: #define COLAMD_STATUS 3 alpar@1: #define COLAMD_INFO1 4 alpar@1: #define COLAMD_INFO2 5 alpar@1: #define COLAMD_INFO3 6 alpar@1: alpar@1: #define COLAMD_OK (0) alpar@1: #define COLAMD_OK_BUT_JUMBLED (1) alpar@1: #define COLAMD_ERROR_A_not_present (-1) alpar@1: #define COLAMD_ERROR_p_not_present (-2) alpar@1: #define COLAMD_ERROR_nrow_negative (-3) alpar@1: #define COLAMD_ERROR_ncol_negative (-4) alpar@1: #define COLAMD_ERROR_nnz_negative (-5) alpar@1: #define COLAMD_ERROR_p0_nonzero (-6) alpar@1: #define COLAMD_ERROR_A_too_small (-7) alpar@1: #define COLAMD_ERROR_col_length_negative (-8) alpar@1: #define COLAMD_ERROR_row_index_out_of_bounds (-9) alpar@1: #define COLAMD_ERROR_out_of_memory (-10) alpar@1: #define COLAMD_ERROR_internal_error (-999) alpar@1: alpar@1: #define colamd_recommended _glp_colamd_recommended alpar@1: size_t colamd_recommended(int nnz, int n_row, int n_col); alpar@1: alpar@1: #define colamd_set_defaults _glp_colamd_set_defaults alpar@1: void colamd_set_defaults(double knobs [COLAMD_KNOBS]); alpar@1: alpar@1: #define colamd _glp_colamd alpar@1: int colamd(int n_row, int n_col, int Alen, int A[], int p[], alpar@1: double knobs[COLAMD_KNOBS], int stats[COLAMD_STATS]); alpar@1: alpar@1: #define symamd _glp_symamd alpar@1: int symamd(int n, int A[], int p[], int perm[], alpar@1: double knobs[COLAMD_KNOBS], int stats[COLAMD_STATS], alpar@1: void *(*allocate)(size_t, size_t), void(*release)(void *)); alpar@1: alpar@1: #define colamd_report _glp_colamd_report alpar@1: void colamd_report(int stats[COLAMD_STATS]); alpar@1: alpar@1: #define symamd_report _glp_symamd_report alpar@1: void symamd_report(int stats[COLAMD_STATS]); alpar@1: alpar@1: #define colamd_printf xprintf alpar@1: alpar@1: #endif alpar@1: alpar@1: /* eof */