From efc0f62b3152860fca228c2a6b39bfbf1978cf8b Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Wed, 3 Dec 2008 19:36:44 +0000 Subject: [PATCH] Save current PBQP state. [r24271] --- heuristical.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/heuristical.c b/heuristical.c index 0edd95859..a1c3dd53a 100644 --- a/heuristical.c +++ b/heuristical.c @@ -850,8 +850,17 @@ static unsigned get_minimal_alternative(pbqp *pbqp, pbqp_node *node) for (node_index = 0; node_index < node_len; ++node_index) { num value = node_vec->entries[node_index].data; - /* TODO Copy PBQP */ + /* Some node buckets and the edge bucket should be empty. */ + assert(node_bucket_get_length(node_buckets[1]) == 0); + assert(node_bucket_get_length(node_buckets[2]) == 0); + assert(edge_bucket_get_length(edge_bucket) == 0); + /* Save current PBQP state. */ + pbqp_node_bucket *bucket_deg0 = node_bucket_deep_copy(node_buckets[0]); + pbqp_node_bucket *bucket_deg3 = node_bucket_deep_copy(node_buckets[3]); + pbqp_node_bucket *bucket_red = node_bucket_deep_copy(reduced_bucket); + + /* TODO */ if (value < min) { min = value; -- 2.20.1