The function 'check_melting_possibility' is not needed anymore.
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Sun, 25 Jul 2010 18:37:19 +0000 (18:37 +0000)
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Sun, 25 Jul 2010 18:37:19 +0000 (18:37 +0000)
[r27809]

optimal.c
optimal.h

index dac0ea2..c4af9aa 100644 (file)
--- 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;
index e71a159..db4f4f5 100644 (file)
--- 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);