#include "bucket.h"
#include "brute_force.h"
#include "optimal.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
node = get_node_with_max_degree();
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);
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");
}
#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"
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");
}
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);
#include "error.h"
#include "bucket.h"
-#if KAPS_DUMP
+#if KAPS_DUMP
#include "html_dumper.h"
#endif
#include "kaps.h"
pbqp->num_rm++;
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Merging n%d into n%d", src_node->index, tgt_node->index);
pbqp->num_rm++;
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Merging n%d into n%d", tgt_node->index, src_node->index);
if (is_deleted(edge))
return;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "Simplification of Edge n%d-n%d", src_node->index, tgt_node->index);
mat = edge->costs;
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("Input:<br>\n", pbqp->dump_file);
dump_simplifyedge(pbqp, edge);
normalize_towards_source(edge);
normalize_towards_target(edge);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nOutput:<br>\n", pbqp->dump_file);
dump_simplifyedge(pbqp, edge);
#endif
if (pbqp_matrix_is_zero(mat, src_vec, tgt_vec)) {
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("edge has been eliminated<br>\n", pbqp->dump_file);
}
ir_timer_start(t_int_simpl);
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
pbqp_dump_input(pbqp);
dump_section(pbqp->dump_file, 1, "2. Simplification of Cost Matrices");
ir_timer_reset_and_start(t_det_solution);
#endif
-#if KAPS_DUMP
+#if KAPS_DUMP
FILE *file;
#endif
(void) pbqp;
-#if KAPS_DUMP
+#if KAPS_DUMP
file = pbqp->dump_file;
if (file) {
solution = pbqp_add(solution,
node->costs->entries[node->solution].data);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (file) {
fprintf(file, "node n%d is set to %d<br>\n", node->index, node->solution);
dump_node(file, node);
#endif
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (file) {
dump_section(file, 2, "Minimum");
#if KAPS_USE_UNSIGNED
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);
}
unsigned node_index;
unsigned node_len = node_bucket_get_length(reduced_bucket);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
dump_section(pbqp->dump_file, 2, "Back Propagation");
}
other_node = edge->src;
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RI-Reduction of Node n%d", node->index);
}
disconnect_edge(other_node, edge);
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nAfter reduction:<br>\n", pbqp->dump_file);
dump_node(pbqp->dump_file, other_node);
tgt_is_src = tgt_edge->src == node;
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
char txt[100];
sprintf(txt, "RII-Reduction of Node n%d", node->index);
reorder_node_after_edge_deletion(tgt_node);
}
-#if KAPS_DUMP
+#if KAPS_DUMP
if (pbqp->dump_file) {
fputs("<br>\nAfter reduction:<br>\n", pbqp->dump_file);
dump_edge(pbqp->dump_file, edge);