summaryrefslogtreecommitdiffstats
path: root/src/dfs.c
diff options
context:
space:
mode:
authorAlexandre Jesus <adbjesus@gmail.com>2017-11-06 18:27:28 +0000
committerAlexandre Jesus <adbjesus@gmail.com>2017-11-06 18:27:28 +0000
commit01c757e09afbc6ae401a56e9f588b21cea54b613 (patch)
tree1d516f02c731ee7f2dff19b0dfddbafb4c041788 /src/dfs.c
parent3333e0c5a1a8e39c74fb178ac124940844463520 (diff)
downloadlibuknapsack-01c757e09afbc6ae401a56e9f588b21cea54b613.tar.gz
libuknapsack-01c757e09afbc6ae401a56e9f588b21cea54b613.zip
Add nem_ull with shuffle
Diffstat (limited to 'src/dfs.c')
-rw-r--r--src/dfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dfs.c b/src/dfs.c
index 12f4ee2..172ac0b 100644
--- a/src/dfs.c
+++ b/src/dfs.c
@@ -88,6 +88,8 @@ struct online_return dfs_online(struct data * data, struct front_item * front, s
* Free leaf;
* Continue;
*/
+ change++;
+
if(tree->depth == data->N) {
front_last->next = new_front_item(tree->values.p, tree->values.w, front_last, NULL);
front_last = front_last->next;
@@ -100,8 +102,6 @@ struct online_return dfs_online(struct data * data, struct front_item * front, s
tree = tree->next;
free(old);
- change++;
-
continue;
}