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 b73afe0..0d902f9 100644
--- a/hadamard_pt.hpp
+++ b/hadamard_pt.hpp
@@ -50,7 +50,7 @@ public:
return accepted;
}
- std::vector<double> tune(unsigned n0, unsigned m, double ε, double ε2) {
+ std::vector<double> tune(unsigned n0, unsigned m, double ε, double ε2, double y = 0.2) {
unsigned n = n0;
while (true) {
@@ -146,7 +146,7 @@ public:
double err = 0;
for (unsigned i = 0; i < T1.size(); i++) {
err += fabs(T1[i] - 1 / Ms[Ms.size() - i - 2].β);
- Ms[Ms.size() - i - 2].β = 1.0 / T1[i];
+ Ms[Ms.size() - i - 2].β = (1 - y) * Ms[Ms.size() - i - 2].β + y / T1[i];
}
double Δf = sqrt(Δf²);