summaryrefslogtreecommitdiff
path: root/lib/wolff.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2017-06-22 16:05:05 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2017-06-22 16:05:05 -0400
commit9db6ee734df8477a2529f56e4a6f4b1784bf941b (patch)
tree363a384753ce52cb681fbb07ba4575e592390651 /lib/wolff.h
parentf2639be5d5006079868f69b0c7105a066166bec6 (diff)
downloadc++-9db6ee734df8477a2529f56e4a6f4b1784bf941b.tar.gz
c++-9db6ee734df8477a2529f56e4a6f4b1784bf941b.tar.bz2
c++-9db6ee734df8477a2529f56e4a6f4b1784bf941b.zip
many changes, simplification of some functions, removal of unneeded ones
Diffstat (limited to 'lib/wolff.h')
-rw-r--r--lib/wolff.h44
1 files changed, 17 insertions, 27 deletions
diff --git a/lib/wolff.h b/lib/wolff.h
index cec9ee3..d3bc412 100644
--- a/lib/wolff.h
+++ b/lib/wolff.h
@@ -1,19 +1,23 @@
-#include <string.h>
-#include <math.h>
-#include <getopt.h>
+#pragma once
+
+#include <assert.h>
+#include <fftw3.h>
#include <float.h>
-#include <sys/types.h>
-#include <inttypes.h>
+#include <getopt.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_rng.h>
+#include <inttypes.h>
+#include <math.h>
#include <stdbool.h>
-#include <assert.h>
-#include <fftw3.h>
+#include <string.h>
+#include <sys/types.h>
#include <jst/graph.h>
#include <jst/rand.h>
+#include "queue.h"
+
typedef struct {
graph_t *g;
bool *spins;
@@ -21,32 +25,18 @@ typedef struct {
double H;
} ising_state_t;
-typedef struct ll_tag {
- uint32_t x;
- struct ll_tag *next;
-} ll_t;
-
typedef struct {
uint32_t nv;
- double dH;
- int32_t dM;
+ int32_t dJb;
+ int32_t dHb;
} cluster_t;
-double get_hamiltonian(graph_t *g, double *coupling, bool *x);
-
-void stack_push(ll_t **q, uint32_t x);
-
-uint32_t stack_pop(ll_t **q);
-
-bool stack_contains(const ll_t *q, uint32_t x);
-
-cluster_t *flip_cluster(const graph_t *g, const double *ps, double H, bool *x, gsl_rng *r);
+cluster_t *flip_cluster(const graph_t *g, const double *ps, bool *x,
+ gsl_rng *r);
graph_t *graph_add_ext(const graph_t *g);
-double hh(double th);
-
double *get_bond_probs(double T, double H, ising_state_t *s);
-uint32_t wolff_step(double T, double H, ising_state_t *s, gsl_rng *r, double *ps);
-
+uint32_t wolff_step(double T, double H, ising_state_t *s, gsl_rng *r,
+ double *ps);