diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-03-01 01:43:33 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-03-01 01:43:33 -0500 |
commit | c960d23a9e147c2043df852460427b95bf752583 (patch) | |
tree | 9df6d14cfff1ec1c7f09535f827463601ac7d467 /lib/cluster.h | |
parent | 4e643b30203b9d8af792c109498ecd70f873d584 (diff) | |
download | c++-c960d23a9e147c2043df852460427b95bf752583.tar.gz c++-c960d23a9e147c2043df852460427b95bf752583.tar.bz2 c++-c960d23a9e147c2043df852460427b95bf752583.zip |
more cosmetic changes
Diffstat (limited to 'lib/cluster.h')
-rw-r--r-- | lib/cluster.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/cluster.h b/lib/cluster.h new file mode 100644 index 0000000..095ed61 --- /dev/null +++ b/lib/cluster.h @@ -0,0 +1,57 @@ + +#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 "orthogonal.h" +#include "dihedral.h" + +typedef struct { + graph_t *g; + q_t *spins; + double T; + double *J; + double *H; + double *J_probs; + double *H_probs; + dihedral_t *R; + double E; + v_t *M; + q_t q; +} ising_state_t; + +typedef struct { + graph_t *g; + double *spins; + double T; + double (*J)(double); + double (*H)(q_t, double *, double *); + double *H_info; + double *R; + double E; + double *M; + q_t n; +} vector_state_t; + +v_t flip_cluster(ising_state_t *s, v_t v0, q_t s1, gsl_rng *r); + +v_t flip_cluster_vector(vector_state_t *s, v_t v0, double *rot, gsl_rng *r); + +graph_t *graph_add_ext(const graph_t *g); + |