assert(node);
assert(pbqp_node_get_degree(node) > 2);
-#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_graph(pbqp);
- }
-#endif
/* Check whether we can merge a neighbor into the current node. */
apply_RM(pbqp, node);
}
if (node_is_reduced(node))
return;
+#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_graph(pbqp);
+ }
+#endif
+
min_index = get_local_minimal_alternative(pbqp, node);
#if KAPS_DUMP
pbqp->num_rm++;
#endif
+#if KAPS_DUMP
+ if (pbqp->dump_file) {
+ char txt[100];
+ sprintf(txt, "Merging n%d into n%d", src_node->index, tgt_node->index);
+ dump_section(pbqp->dump_file, 3, txt);
+ }
+#endif
+
/* Reconnect the source's edges with the target node. */
for (edge_index = 0; edge_index < edge_len; ++edge_index) {
pbqp_edge *old_edge = src_node->edges[edge_index];
pbqp->num_rm++;
#endif
+#if KAPS_DUMP
+ if (pbqp->dump_file) {
+ char txt[100];
+ sprintf(txt, "Merging n%d into n%d", tgt_node->index, src_node->index);
+ dump_section(pbqp->dump_file, 3, txt);
+ }
+#endif
+
/* Reconnect the target's edges with the source node. */
for (edge_index = 0; edge_index < edge_len; ++edge_index) {
pbqp_edge *old_edge = tgt_node->edges[edge_index];