summaryrefslogtreecommitdiff
path: root/lib/wolff.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-21 13:21:49 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-21 13:21:49 -0400
commit0c69763278ed102d0e37aa1fb4feda5827c26c62 (patch)
tree0227d36b272c1243cde6827dcde6f2b3014abb95 /lib/wolff.h
parentf14e6eb0e8cb01ee29f98db9797ac37f3e690cb8 (diff)
downloadc++-0c69763278ed102d0e37aa1fb4feda5827c26c62.tar.gz
c++-0c69763278ed102d0e37aa1fb4feda5827c26c62.tar.bz2
c++-0c69763278ed102d0e37aa1fb4feda5827c26c62.zip
simplified the way that measurements work
Diffstat (limited to 'lib/wolff.h')
-rw-r--r--lib/wolff.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/wolff.h b/lib/wolff.h
index 21e88d9..4e93d01 100644
--- a/lib/wolff.h
+++ b/lib/wolff.h
@@ -3,7 +3,7 @@
#include "state.h"
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 *, const state_t <R_t, X_t> *)> gen_R, unsigned int n_measurements, std::function <void(const state_t <R_t, X_t> *)> *measurements, gsl_rng *r, bool silent) {
+void wolff(count_t N, state_t <R_t, X_t> *s, std::function <R_t(gsl_rng *, const state_t <R_t, X_t> *)> gen_R, std::function <void(const state_t <R_t, X_t> *)> measurements, gsl_rng *r, bool silent) {
if (!silent) printf("\n");
for (count_t steps = 0; steps < N; steps++) {
@@ -14,9 +14,7 @@ void wolff(count_t N, state_t <R_t, X_t> *s, std::function <R_t(gsl_rng *, const
flip_cluster <R_t, X_t> (s, v0, step, r);
free_spin(step);
- for (unsigned int i = 0; i < n_measurements; i++) {
- measurements[i](s);
- }
+ measurements(s);
}
if (!silent) {