From 281a6d8b96a1a3324d435db65e54b603ddfd9e04 Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Mon, 6 Oct 2008 17:14:56 +0000 Subject: [PATCH] - added html dumping of RN reductions - typos [r22544] --- heuristical.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/heuristical.c b/heuristical.c index 36e7e9bdc..ef53b545b 100644 --- a/heuristical.c +++ b/heuristical.c @@ -427,7 +427,7 @@ void apply_RI(pbqp *pbqp) if (pbqp->dump_file) { char txt[100]; - sprintf(txt, "RI-Reduktion of Node n%d", node->index); + sprintf(txt, "RI-Reduction of Node n%d", node->index); dump_section(pbqp->dump_file, 2, txt); pbqp_dump_graph(pbqp); fputs("
\nBefore reduction:
\n", pbqp->dump_file); @@ -516,7 +516,7 @@ void apply_RII(pbqp *pbqp) if (pbqp->dump_file) { char txt[100]; - sprintf(txt, "RII-Reduktion of Node n%d", node->index); + sprintf(txt, "RII-Reduction of Node n%d", node->index); dump_section(pbqp->dump_file, 2, txt); pbqp_dump_graph(pbqp); fputs("
\nBefore reduction:
\n", pbqp->dump_file); @@ -615,6 +615,13 @@ void apply_RN(pbqp *pbqp) assert(pbqp); + 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); + } + for (node_index = 0; node_index < node_len; ++node_index) { num value = 0; @@ -642,6 +649,13 @@ void apply_RN(pbqp *pbqp) } } + if (pbqp->dump_file) { + fprintf(pbqp->dump_file, "node n%d is set to %d

\n", + node->index, min_index); + fprintf(pbqp->dump_file, "Minimal cost of RN reduction: %d
\n", + min); + } + node->solution = min_index; /* Now that we found the local minimum set all other costs to infinity. */ -- 2.20.1