diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-10-12 16:18:11 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-10-12 16:18:11 -0400 |
commit | 77584d5ab2182f5e9d9b8614b600b2e1ef08bb7f (patch) | |
tree | df42f62f6b920164d60c180dfb6753b4a1556d00 /lib/wolff.h | |
parent | 969e9dd60bf2966ec696120df61317ecb5961f35 (diff) | |
download | c++-77584d5ab2182f5e9d9b8614b600b2e1ef08bb7f.tar.gz c++-77584d5ab2182f5e9d9b8614b600b2e1ef08bb7f.tar.bz2 c++-77584d5ab2182f5e9d9b8614b600b2e1ef08bb7f.zip |
made collection of data more standard and efficient
Diffstat (limited to 'lib/wolff.h')
-rw-r--r-- | lib/wolff.h | 16 |
1 files changed, 16 insertions, 0 deletions
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); + |