Skip to content
Snippets Groups Projects
Commit 3984abfc authored by Florian Heinrichs's avatar Florian Heinrichs
Browse files

Update bnb.cpp

parent 4919b690
No related merge requests found
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
...@@ -24,7 +23,7 @@ void assignment_state::assign(vertex_id node, partition_index p, std::vector<uns ...@@ -24,7 +23,7 @@ void assignment_state::assign(vertex_id node, partition_index p, std::vector<uns
assigned_partition_[node] = p; assigned_partition_[node] = p;
//for each neighbor of node in other partitions: current_objective++ //for each neighbor of node in other partitions: current_objective++
for(auto neighbor: neighbors){ for(auto neighbor: neighbors){
if(assigned_partition_[neighbor] != 100 && assigned_partition_[neighbor] != p) if(assigned_partition_[neighbor] == (p xor 1))
current_objective_++; current_objective_++;
} }
node_count[p]++; node_count[p]++;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment