summaryrefslogtreecommitdiff
path: root/lib/wolff.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-24 13:12:35 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-24 13:12:35 -0400
commitc48fd16fe1554c88c79a1f0d50e81c803da8f61f (patch)
tree2b8a07de4e0fc795854fc4c1ac0ff095783218fa /lib/wolff.h
parent8d96c4d30214a2c27561740b7b3f7e1e3b0bbfe4 (diff)
downloadc++-c48fd16fe1554c88c79a1f0d50e81c803da8f61f.tar.gz
c++-c48fd16fe1554c88c79a1f0d50e81c803da8f61f.tar.bz2
c++-c48fd16fe1554c88c79a1f0d50e81c803da8f61f.zip
implemented updating the first fourier moment in wolff_finite, but also make wolff_finite obselete by adding a hacky preprocessor method for making wolff.h as efficient
Diffstat (limited to 'lib/wolff.h')
-rw-r--r--lib/wolff.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/wolff.h b/lib/wolff.h
index 8286024..da4b7b6 100644
--- a/lib/wolff.h
+++ b/lib/wolff.h
@@ -5,6 +5,10 @@
template <class R_t, class X_t>
void wolff(count_t N, state_t <R_t, X_t> *s, std::function <R_t(gsl_rng *, X_t s0)> gen_R, std::function <void(const state_t <R_t, X_t> *)> measurements, gsl_rng *r, bool silent) {
+#ifdef FINITE_STATES
+ initialize_probs(s->J, s->H, s->T);
+#endif
+
if (!silent) printf("\n");
for (count_t steps = 0; steps < N; steps++) {
if (!silent) printf("\033[F\033[JWOLFF: step %" PRIu64 " / %" PRIu64 ": E = %.2f, S = %" PRIv "\n", steps, N, s->E, s->last_cluster_size);