summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadamard_pt.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/hadamard_pt.hpp b/hadamard_pt.hpp
index 9f50e1e..59081b2 100644
--- a/hadamard_pt.hpp
+++ b/hadamard_pt.hpp
@@ -86,8 +86,8 @@ public:
}
colors.front() = down;
colors.back() = up;
- for (unsigned j = 0; j < Ms.size(); j++) {
- if (i > n / 2) {
+ if (i > n / 2) {
+ for (unsigned j = 0; j < Ms.size(); j++) {
if (colors[j] == up) {
nu[j]++;
} else if (colors[j] == down) {
@@ -133,7 +133,7 @@ public:
for (unsigned i = 0; i < η.size(); i++) {
double xnew = x + η[i] * (T(i + 1) - T(i)) / C;
while (j < xnew * η.size() && j < η.size()) {
- T1[j - 1] = T(i) + (j / (double)η.size() - x) / η[i] * C;
+ T1[j - 1] = T(i) + (j / (double)Ms.size() - x) / η[i] * C;
j++;
}
x = xnew;