summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-05-12 00:58:35 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-05-12 00:58:35 -0400
commit667c68e5e69e32fbe5546fb8e7350ee53b9e1d5f (patch)
tree63c0dfe721fa404646ca439b7a65e2f29936a5b3
parent5a40016b1512406bfda74c16b3ddb11347050981 (diff)
downloadcode-667c68e5e69e32fbe5546fb8e7350ee53b9e1d5f.tar.gz
code-667c68e5e69e32fbe5546fb8e7350ee53b9e1d5f.tar.bz2
code-667c68e5e69e32fbe5546fb8e7350ee53b9e1d5f.zip
Removed overengineered tuning system.
-rw-r--r--hadamard.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/hadamard.cpp b/hadamard.cpp
index b311e2d..4630ca0 100644
--- a/hadamard.cpp
+++ b/hadamard.cpp
@@ -121,26 +121,16 @@ int main(int argc, char* argv[]) {
std::vector<double> f;
std::cout << "Beginning simulation of " << n << ".\n";
- bool still_tuning = true;
- while (still_tuning) {
- std::cout << "Beginning " << n_tuning << " tuning tempering updates of " << M
- << " sweeps each.\n";
- f = p.tune(n_tuning, M, ε, ε2);
- std::cout << "Finished tuning, beginning " << m << " measurement tempering updates of " << M
- << " sweeps each.\n";
- std::cout << "βs: ";
- for (const MCMC& M : p.Ms) {
- std::cout << M.β << " ";
- }
- std::cout << std::endl;
- std::cout << "Accept tuning as finished? (y/N): ";
- char answer = getchar();
- if (answer == 'y') {
- still_tuning = false;
- }
- ε /= 2;
- ε2 /= 2;
+ std::cout << "Beginning " << n_tuning << " tuning tempering updates of " << M
+ << " sweeps each.\n";
+ f = p.tune(n_tuning, M, ε, ε2);
+ std::cout << "Finished tuning, beginning " << m << " measurement tempering updates of " << M
+ << " sweeps each.\n";
+ std::cout << "βs: ";
+ for (const MCMC& M : p.Ms) {
+ std::cout << M.β << " ";
}
+ std::cout << std::endl;
std::cout << "Running " << m << " PT swaps of " << M << " sweeps each.";
p.run(m, M);
std::cout << "Finished " << n << ".\n";