diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-12-22 18:24:25 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-12-22 18:24:25 -0500 |
commit | 76204921e61c9178e800b48a9f5343bd44f6854b (patch) | |
tree | 88203f62345a7041128474fcb1eda479a4145259 | |
parent | 47546b445b18cbc13892702cabd4c22968a9bde9 (diff) | |
download | code-76204921e61c9178e800b48a9f5343bd44f6854b.tar.gz code-76204921e61c9178e800b48a9f5343bd44f6854b.tar.bz2 code-76204921e61c9178e800b48a9f5343bd44f6854b.zip |
fewer pt tries per sweep
-rw-r--r-- | hadamard_pt.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hadamard_pt.hpp b/hadamard_pt.hpp index 9365e50..7b53b92 100644 --- a/hadamard_pt.hpp +++ b/hadamard_pt.hpp @@ -73,7 +73,7 @@ public: Ms[j].tune(m, ε); } - for (unsigned k = 0; k < m * Ms.size() - 1; k++) { + for (unsigned k = 0; k < m * Ms.size(); k++) { unsigned j = rng.uniform((unsigned)0, (unsigned)(Ms.size() - 2)); if (this->step(j, j + 1, true)) { @@ -90,8 +90,6 @@ public: nd[j]++; } } - - } std::vector<double> f(Ms.size()); @@ -157,7 +155,7 @@ public: for (unsigned j = 0; j < Ms.size(); j++) { Ms[j].run(m, dry); } - for (unsigned j = 0; j < Ms.size() * m; j++) { + for (unsigned j = 0; j < Ms.size(); j++) { unsigned k = rng.uniform((unsigned)0, (unsigned)(Ms.size() - 2)); this->step(k, k + 1, dry); } |