#include "bucket.h"
#include "heuristical_co_ld.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
vector_t *vec;
int is_src;
- assert(pbqp);
- assert(node);
-
(void) pbqp;
edge = node->edges[0];
if (is_src) {
other = edge->tgt;
- assert(other);
-
node->solution = pbqp_matrix_get_col_min_index(mat, other->solution, vec);
} else {
other = edge->src;
- assert(other);
-
node->solution = pbqp_matrix_get_row_min_index(mat, other->solution, vec);
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
node->solution = vector_get_min_index(vec);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
assert(vector_get_min(vec) != INF_COSTS);
node->solution = vector_get_min_index(vec);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br>\n", node->index, node->solution);
}
assert(pbqp);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
- dump_section(pbqp->dump_file, 2, "Back Propagation");
+ pbqp_dump_section(pbqp->dump_file, 2, "Back Propagation");
}
#endif
plist_insert_front(rpeo, node);
} while(node_is_reduced(node));
- assert(node);
assert(pbqp_node_get_degree(node) > 2);
/* Check whether we can merge a neighbor into the current node. */
node = merged_node;
merged_node = NULL;
- assert(node);
if (node_is_reduced(node))
return;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RN-Reduction of Node n%d", node->index);
- dump_section(pbqp->dump_file, 2, txt);
+ pbqp_dump_section(pbqp->dump_file, 2, txt);
pbqp_dump_graph(pbqp);
}
#endif
/* get neighbor node */
edge = node->edges[edge_index];
- assert(edge);
neighbor = edge->src == node ? edge->tgt : edge->src;
- assert(neighbor);
assert(neighbor != node);