diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-06-26 15:13:46 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-06-26 15:13:46 -0400 |
commit | 25781a4041fa75a3394949d111be3abbefc97c26 (patch) | |
tree | 60e9db774c2257a045efabf50aea13d850d8c265 /lib/cluster_finite.h | |
parent | 7ee46e45abea3261b2728aa4d0f03f939e123dc7 (diff) | |
download | c++-25781a4041fa75a3394949d111be3abbefc97c26.tar.gz c++-25781a4041fa75a3394949d111be3abbefc97c26.tar.bz2 c++-25781a4041fa75a3394949d111be3abbefc97c26.zip |
began generalizing the potts code to work with all finite spin spaces
Diffstat (limited to 'lib/cluster_finite.h')
-rw-r--r-- | lib/cluster_finite.h | 42 |
1 files changed, 42 insertions, 0 deletions
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 <assert.h> +#include <fftw3.h> +#include <float.h> +#include <gsl/gsl_randist.h> +#include <gsl/gsl_rng.h> +#include <inttypes.h> +#include <math.h> +#include <stdbool.h> +#include <string.h> +#include <sys/types.h> + +#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); + |