#include "bucket.h"
#include "brute_force.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
unsigned bucket_index;
assert(pbqp);
- assert(node);
node_vec = node->costs;
node_len = node_vec->len;
bucket_index = node->bucket_index;
/* We want to reduce a node with maximum degree. */
node = get_node_with_max_degree();
- assert(node);
assert(pbqp_node_get_degree(node) > 2);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "BF-Reduction of Node n%d", node->index);
min_index = get_minimal_alternative(pbqp, node);
node = pbqp->nodes[node->index];
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fprintf(pbqp->dump_file, "node n%d is set to %d<br><br>\n",
node->index, min_index);
int is_src;
assert(pbqp);
- assert(node);
edge = node->edges[0];
mat = edge->costs;
if (is_src) {
other = edge->tgt;
- assert(other);
/* Update pointer for brute force solver. */
other = pbqp->nodes[other->index];
node->solution = pbqp_matrix_get_col_min_index(mat, other->solution, vec);
} else {
other = edge->src;
- assert(other);
/* Update pointer for brute force solver. */
other = pbqp->nodes[other->index];
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(pbqp);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
dump_section(pbqp->dump_file, 2, "Back Propagation");
}