00001 #ifndef __DP_TIGHTEN_C__ 00002 #define __DP_TIGHTEN_C__ 00003 00004 /* ========================================================================= */ 00005 /* define the debug level to use for this program, the efect depend on the DEBUG 00006 * constant defined at compile time, if that variables is >= to the level 00007 * indicated here we will make more tests */ 00008 #define DPT_DBG 10 /* test basic conditions */ 00009 #define DPT_EDBG 10 /* make exhaustive test of conditions */ 00010 #define DPT_VRB 10 /* fully log the program trace */ 00011 00012 /* ========================================================================= */ 00013 /* given a residual graph G^*, and a valid DP inequality, it will try to find a 00014 * 'more' violated DP-inequality constraint; the function will not touch the 00015 * data abour the graph nor about the original inequality, but it will alloc 00016 * memory for all data in the new returned inequality. Note too that the number 00017 * of dominos of the new inequality is the same as in the original inequality. 00018 * Finaly, the violation (if it is positive) of the new inequality is returned 00019 * in (*violation). If an error occurs the function will return 1, zero on 00020 * success (this doesn't imply that we were able to find a violated constraint 00021 * from the original onw */ 00022 int DPtighten ( /* graph G* data */ 00023 int n_nodes, 00024 int n_edges, 00025 int *edges, 00026 double const *const weight, 00027 /* original constrain to tighten */ 00028 int n_dominos, 00029 int *n_aset, 00030 int *n_bset, 00031 int n_handle, 00032 int **aset, 00033 int **bset, 00034 int *handle, 00035 /* new generated constraint */ 00036 int **new_n_aset, 00037 int **new_n_bset, 00038 int *new_n_handle, 00039 int ***new_aset, 00040 int ***new_bset, 00041 int **new_handle, 00042 double *violation); 00043 #endif