summaryrefslogtreecommitdiff
path: root/lib/ising.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-24 15:26:31 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-24 15:26:31 -0400
commit96e878d2f69790dc72bb4b713c1d492fa2b4c587 (patch)
tree9b8dd7d0f2e448646bbeb74b8c943532d3650fe4 /lib/ising.h
parentc48fd16fe1554c88c79a1f0d50e81c803da8f61f (diff)
downloadc++-96e878d2f69790dc72bb4b713c1d492fa2b4c587.tar.gz
c++-96e878d2f69790dc72bb4b713c1d492fa2b4c587.tar.bz2
c++-96e878d2f69790dc72bb4b713c1d492fa2b4c587.zip
added preprocessor method for potts, and implemented dihedral for the c++ stuff
Diffstat (limited to 'lib/ising.h')
-rw-r--r--lib/ising.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ising.h b/lib/ising.h
index d956d88..ec392bf 100644
--- a/lib/ising.h
+++ b/lib/ising.h
@@ -93,3 +93,7 @@ void write_magnetization(int M, FILE *outfile) {
fwrite(&M, sizeof(int), 1, outfile);
}
+#define N_STATES 2
+const ising_t states[2] = {(bool)0, (bool)1};
+q_t state_to_ind(ising_t state) { return (q_t)state.x; }
+