From 25781a4041fa75a3394949d111be3abbefc97c26 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 26 Jun 2018 15:13:46 -0400 Subject: began generalizing the potts code to work with all finite spin spaces --- lib/cluster_finite.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/cluster_finite.h (limited to 'lib/cluster_finite.h') diff --git a/lib/cluster_finite.h b/lib/cluster_finite.h new file mode 100644 index 0000000..abdc8fc --- /dev/null +++ b/lib/cluster_finite.h @@ -0,0 +1,42 @@ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "types.h" +#include "rand.h" +#include "stack.h" +#include "convex.h" +#include "graph.h" +#include "tree.h" +#include "measurement.h" +#include "symmetric.h" +#include "yule_walker.h" + +typedef struct { + graph_t *g; + q_t q; + R_t n_transformations; + q_t *transformations; + double T; + double *J; + double *H; + double *J_probs; + double *H_probs; + q_t *spins; + q_t *R; + double E; + v_t *M; +} state_finite_t; + +v_t flip_cluster_finite(state_finite_t *s, v_t v0, q_t rot, gsl_rng *r); + -- cgit v1.2.3-70-g09d2