From 77584d5ab2182f5e9d9b8614b600b2e1ef08bb7f Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 12 Oct 2017 16:18:11 -0400 Subject: made collection of data more standard and efficient --- lib/wolff.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/wolff.h') diff --git a/lib/wolff.h b/lib/wolff.h index 428ce85..82ccb9e 100644 --- a/lib/wolff.h +++ b/lib/wolff.h @@ -31,6 +31,17 @@ typedef struct { int32_t dHb; } cluster_t; +typedef struct { + uint64_t n; + double x; + double dx; + double x2; + double m2; + double m4; + double c; + double dc; +} meas_t; + int32_t sign(double x); cluster_t *flip_cluster(const graph_t *g, const double *ps, bool *x, @@ -40,3 +51,8 @@ graph_t *graph_add_ext(const graph_t *g); uint32_t wolff_step(double T, double H, ising_state_t *s, gsl_rng *r, double *ps); + +void update_meas(meas_t *m, double x); + +double add_to_avg(double mx, double x, uint64_t n); + -- cgit v1.2.3-70-g09d2