summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-20 00:10:55 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-20 00:10:55 -0500
commit2435517735283c5e49e844ff848b3e1bdf24857d (patch)
tree9ecee6f4ce83d44901b7996c30e90c59c41a91bc
parent2a419c1324f6ffd59e92c0b63f0b890195bf5b1b (diff)
downloadcode-2435517735283c5e49e844ff848b3e1bdf24857d.tar.gz
code-2435517735283c5e49e844ff848b3e1bdf24857d.tar.bz2
code-2435517735283c5e49e844ff848b3e1bdf24857d.zip
trying to remove anamolous acceptance rates from edges
-rw-r--r--hadamard_pt.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/hadamard_pt.hpp b/hadamard_pt.hpp
index 812186d..74c3b73 100644
--- a/hadamard_pt.hpp
+++ b/hadamard_pt.hpp
@@ -73,9 +73,9 @@ public:
std::vector<unsigned> nu(Ms.size(), 0);
std::vector<unsigned> nd(Ms.size(), 0);
- colors.front() = down;
- colors.back() = up;
for (unsigned i = 0; i < n; i++) {
+ colors.front() = down;
+ colors.back() = up;
#pragma omp parallel for
for (unsigned j = 0; j < Ms.size(); j++) {
Ms[j].tune(m, ε);
@@ -84,8 +84,6 @@ public:
for (unsigned j = 0; j < Ms.size() - 1; j++) {
if (this->step(j, j + 1, true)) {
std::swap(colors[j], colors[j + 1]);
- colors.front() = down;
- colors.back() = up;
if (colors[j] == up) {
nu[j]++;
@@ -97,6 +95,7 @@ public:
} else if (colors[j + 1] == down) {
nd[j + 1]++;
}
+
}
}
}