summaryrefslogtreecommitdiff
path: root/lib/wolff.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-17 22:37:57 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-17 22:37:57 -0400
commit8a6109a78a6f7b9e9585cd89e8a10d1f626b3af1 (patch)
treee92a3dd47173597f5f5e54668f98c2fe77b4d40f /lib/wolff.h
parent6a3d9dbb3f5f1c242ada1ecbbdbb9c3cd865d4cf (diff)
downloadc++-8a6109a78a6f7b9e9585cd89e8a10d1f626b3af1.tar.gz
c++-8a6109a78a6f7b9e9585cd89e8a10d1f626b3af1.tar.bz2
c++-8a6109a78a6f7b9e9585cd89e8a10d1f626b3af1.zip
made many changes to implement alternate reflection generators, this is broken
Diffstat (limited to 'lib/wolff.h')
-rw-r--r--lib/wolff.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/wolff.h b/lib/wolff.h
index caf413b..90470d5 100644
--- a/lib/wolff.h
+++ b/lib/wolff.h
@@ -2,7 +2,8 @@
#include <time.h>
#include <getopt.h>
-#include <cluster.h>
+#include "cluster.h"
+#include "state.h"
template <q_t q, class T>
double H_vector(vector_t <q, T> v1, T *H) {
@@ -12,7 +13,7 @@ double H_vector(vector_t <q, T> v1, T *H) {
}
template <class R_t, class X_t>
-void wolff(count_t N, D_t D, L_t L, double T, std::function <double(X_t, X_t)> J, std::function <double(X_t)> H, unsigned long timestamp, bool silent) {
+void wolff(count_t N, D_t D, L_t L, double T, std::function <double(X_t, X_t)> J, std::function <double(X_t)> H, std::function <R_t(gsl_rng *, const state_t <R_t, X_t> *)> gen_R, unsigned long timestamp, bool silent) {
state_t <R_t, X_t> s(D, L, T, J, H);
@@ -44,8 +45,7 @@ void wolff(count_t N, D_t D, L_t L, double T, std::function <double(X_t, X_t)> J
v_t v0 = gsl_rng_uniform_int(r, s.nv);
- R_t step;
- generate_rotation(r, &step);
+ R_t step = gen_R(r, &s);
cluster_size = flip_cluster <R_t, X_t> (&s, v0, step, r);