From f2a747eff7add6e6de089ba38602d4ede103c5d5 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 10 Dec 2019 13:53:36 -0500 Subject: mistake in initialization led to incorrect energies --- hadamard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadamard.cpp b/hadamard.cpp index 15f73b1..0a8ba36 100644 --- a/hadamard.cpp +++ b/hadamard.cpp @@ -15,8 +15,8 @@ public: } void after_sweep(double, double E, const Orthogonal&) override { - totalE += E; N++; + totalE += E; } double energy() const { return totalE / N; } @@ -99,6 +99,7 @@ int main(int argc, char* argv[]) { for (MCMC& sim : p.Ms) { sim.M = walsh(k); + sim.E = sim.M.energy(); } std::cout << "Beginning " << n_tuning << " tuning steps for " << n << ".\n"; -- cgit v1.2.3-70-g09d2