43 RandomNumberEngine &random_number_engine,
45 auto urd = std::uniform_real_distribution<>(0, 1.0);
49 for (
const auto &index_binary : system.get_active_binaries()) {
50 const FloatType dE_s = system.dE_single(index_binary);
51 if (system.count_call_updater % system.rate_call_k_local == 0 &&
53 for (
const auto &index_key : system.get_adj(index_binary)) {
54 if (system.GetPolyValue(index_key) >= 0.0) {
57 const FloatType dE_i = system.dE_k_local(index_key);
59 std::exp(-parameter.
beta * dE_i) > urd(random_number_engine)) {
60 system.update_system_k_local();
62 system.reset_virtual_system();
65 }
else if (dE_s <= 0.0 ||
66 std::exp(-parameter.
beta * dE_s) > urd(random_number_engine)) {
67 system.update_system_single(index_binary);
75 if (count ==
static_cast<int64_t
>(system.get_active_binaries().size()) &&
76 system.count_call_updater % system.rate_call_k_local != 0) {
77 for (
const auto &index_binary : system.get_active_binaries()) {
78 const FloatType dE_s = system.dE_single(index_binary);
79 if (dE_s == 0.0 && system.binaries[index_binary] == 1) {
80 system.update_system_single(index_binary);
83 for (int64_t index_key = 0; index_key < system.GetNumInteractions();
85 if (system.GetPolyValue(index_key) >= 0.0) {
88 if (system.GetZeroCount(index_key) != 0) {
89 const FloatType dE_i = system.dE_k_local(index_key);
91 system.update_system_k_local();
93 system.reset_virtual_system();
99 system.count_call_updater++;