From a0db32c0ad05fbe2753d44b1e82f608d99bd9742 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 31 Oct 2017 23:43:51 -0400 Subject: completely changed how autocorrelation is computed --- lib/wolff.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/wolff.h') diff --git a/lib/wolff.h b/lib/wolff.h index 84b3d22..cf24427 100644 --- a/lib/wolff.h +++ b/lib/wolff.h @@ -50,7 +50,16 @@ typedef struct { double dc; } meas_t; -int32_t sign(double x); +typedef struct { + uint64_t n; + uint64_t W; + double *OO; + double *Op; + double O; + double O2; +} autocorr_t; + +int8_t sign(double x); cluster_t *flip_cluster(const graph_t *g, const double *ps, bool *x, bool stop_on_ghost, gsl_rng *r); @@ -62,5 +71,9 @@ uint32_t wolff_step(double T, double H, ising_state_t *s, sim_t sim, gsl_rng *r, void update_meas(meas_t *m, double x); +void update_autocorr(autocorr_t *OO, double O); + double add_to_avg(double mx, double x, uint64_t n); +double rho(autocorr_t *o, uint64_t i); + -- cgit v1.2.3-70-g09d2