summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-20 01:59:53 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-20 01:59:53 -0500
commitd244bf28e4f1c9babb314786bc9bc386ce052d88 (patch)
tree7bb263e0ed1d9b6238226343ee9eff3e8994f5f7
parent1e69e3139e7c846828de049879677a5b359a3ae1 (diff)
downloadcode-d244bf28e4f1c9babb314786bc9bc386ce052d88.tar.gz
code-d244bf28e4f1c9babb314786bc9bc386ce052d88.tar.bz2
code-d244bf28e4f1c9babb314786bc9bc386ce052d88.zip
another try
-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;