From 6d5b3ca43f0b041219f1609ffeeff588e480665b Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Sat, 6 Dec 2008 14:15:45 +0000 Subject: [PATCH] Save bucket index before changing the current node. [r24349] --- heuristical.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/heuristical.c b/heuristical.c index 67bf77b9a..4744b79a3 100644 --- a/heuristical.c +++ b/heuristical.c @@ -864,11 +864,13 @@ static unsigned get_minimal_alternative(pbqp *pbqp, pbqp_node *node) unsigned node_len; unsigned min_index = 0; num min = INF_COSTS; + unsigned bucket_index; assert(pbqp); assert(node); - node_vec = node->costs; - node_len = node_vec->len; + node_vec = node->costs; + node_len = node_vec->len; + bucket_index = node->bucket_index; for (node_index = 0; node_index < node_len; ++node_index) { pbqp_node_bucket bucket_deg0; @@ -889,7 +891,7 @@ static unsigned get_minimal_alternative(pbqp *pbqp, pbqp_node *node) node_bucket_deep_copy(pbqp, &bucket_red, reduced_bucket); /* Select alternative and solve PBQP recursively. */ - select_alternative(node, node_index); + select_alternative(node_buckets[3][bucket_index], node_index); apply_brute_force_reductions(pbqp); value = determine_solution(pbqp->dump_file); -- 2.20.1