summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadamard_pt.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hadamard_pt.hpp b/hadamard_pt.hpp
index 59081b2..9886462 100644
--- a/hadamard_pt.hpp
+++ b/hadamard_pt.hpp
@@ -39,7 +39,7 @@ public:
}
}
- double T(unsigned i) {
+ double T(signed i) {
return 1 / Ms[Ms.size() - i - 1].β;
}
@@ -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)Ms.size() - x) / η[i] * C;
+ T1[j - 1] = T(i) + (j / (double)η.size() - x) / η[i] * C;
j++;
}
x = xnew;