From 2609b808fa50dc8b8b79df02bed76ad408e01f0d Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Sun, 25 Jul 2010 18:37:19 +0000 Subject: [PATCH] The function 'check_melting_possibility' is not needed anymore. [r27809] --- optimal.c | 100 ------------------------------------------------------ optimal.h | 4 --- 2 files changed, 104 deletions(-) diff --git a/optimal.c b/optimal.c index dac0ea240..c4af9aabd 100644 --- a/optimal.c +++ b/optimal.c @@ -543,106 +543,6 @@ void reorder_node(pbqp_node *node) node_bucket_insert(&node_buckets[degree], node); } -#if KAPS_STATISTIC -void check_melting_possibility(pbqp *pbqp, pbqp_edge *edge) -{ - pbqp_matrix *mat; - pbqp_node *src_node; - pbqp_node *tgt_node; - vector *src_vec; - vector *tgt_vec; - int src_len; - int tgt_len; - int src_index; - int tgt_index; - - assert(pbqp); - assert(edge); - - src_node = edge->src; - tgt_node = edge->tgt; - assert(src_node); - assert(tgt_node); - - src_vec = src_node->costs; - tgt_vec = tgt_node->costs; - assert(src_vec); - assert(tgt_vec); - - src_len = src_vec->len; - tgt_len = tgt_vec->len; - assert(src_len > 0); - assert(tgt_len > 0); - - mat = edge->costs; - assert(mat); - - if (src_len == 1 && tgt_len == 1) { - //panic("Something is wrong"); - } - - int allRowsOk = 1; - for (src_index = 0; src_index < src_len; ++src_index) { - int onlyOneZero = 0; - if (src_vec->entries[src_index].data == INF_COSTS) { - continue; - } - for (tgt_index = 0; tgt_index < tgt_len; ++tgt_index) { - if (tgt_vec->entries[tgt_index].data == INF_COSTS) { - continue; - } - if (mat->entries[src_index * tgt_len + tgt_index] == 0) { - if (onlyOneZero) { - onlyOneZero = 0; - break; - } else { - onlyOneZero = 1; - continue; - } - } - if (mat->entries[src_index * tgt_len + tgt_index] == INF_COSTS) { - continue; - } - onlyOneZero = 0; - break; - } - allRowsOk &= onlyOneZero; - } - - int allColsOk = 1; - for (tgt_index = 0; tgt_index < tgt_len; ++tgt_index) { - int onlyOneZero = 0; - if (tgt_vec->entries[tgt_index].data == INF_COSTS) { - continue; - } - for (src_index = 0; src_index < src_len; ++src_index) { - if (src_vec->entries[src_index].data == INF_COSTS) { - continue; - } - if (mat->entries[src_index * tgt_len + tgt_index] == 0) { - if (onlyOneZero) { - onlyOneZero = 0; - break; - } else { - onlyOneZero = 1; - continue; - } - } - if (mat->entries[src_index * tgt_len + tgt_index] == INF_COSTS) { - continue; - } - onlyOneZero = 0; - break; - } - allColsOk &= onlyOneZero; - } - - if (allRowsOk || allColsOk) { - pbqp->num_rm++; - } -} -#endif - void simplify_edge(pbqp *pbqp, pbqp_edge *edge) { pbqp_matrix *mat; diff --git a/optimal.h b/optimal.h index e71a159e4..db4f4f5f7 100644 --- a/optimal.h +++ b/optimal.h @@ -38,10 +38,6 @@ void apply_edge(pbqp *pbqp); void apply_RI(pbqp *pbqp); void apply_RII(pbqp *pbqp); -#if KAPS_STATISTIC -void check_melting_possibility(pbqp *pbqp, pbqp_edge *edge); -#endif - void back_propagate(pbqp *pbqp); num determine_solution(pbqp *pbqp); void fill_node_buckets(pbqp *pbqp); -- 2.20.1