summaryrefslogtreecommitdiff
path: root/hadamard_pt.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'hadamard_pt.hpp')
-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]++;
}
+
}
}
}