summaryrefslogtreecommitdiff
path: root/hadamard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hadamard.cpp')
-rw-r--r--hadamard.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/hadamard.cpp b/hadamard.cpp
index 86c27d8..a2c4199 100644
--- a/hadamard.cpp
+++ b/hadamard.cpp
@@ -2,9 +2,9 @@
#include "hadamard_pt.hpp"
#include "matrices.hpp"
+#include <chrono>
#include <fstream>
#include <iostream>
-#include <chrono>
class MeasureEnergy : public Measurement {
public:
@@ -44,8 +44,7 @@ public:
MeasureTransitionRates(unsigned n) : nAccepted(n - 1, 0), total_steps(n - 1, 0) {}
- void after_step(bool accepted, unsigned i, double, double, const MCMC&,
- const MCMC&) override {
+ void after_step(bool accepted, unsigned i, double, double, const MCMC&, const MCMC&) override {
total_steps[i]++;
if (accepted)
nAccepted[i]++;
@@ -130,7 +129,9 @@ int main(int argc, char* argv[]) {
auto tag = std::chrono::high_resolution_clock::now();
- std::string filename = "hmm_" + std::to_string(n) + "_" + std::to_string(β₀) + "_" + std::to_string(β₁) + "_" + std::to_string(N) + "_" + std::to_string(tag.time_since_epoch().count()) + ".dat";
+ std::string filename = "hmm_" + std::to_string(n) + "_" + std::to_string(β₀) + "_" +
+ std::to_string(β₁) + "_" + std::to_string(N) + "_" +
+ std::to_string(tag.time_since_epoch().count()) + ".dat";
std::ofstream file(filename);