summaryrefslogtreecommitdiff
path: root/lib/z2.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-10 21:45:32 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-10 21:45:32 -0400
commita43ff1f98e9b9814f858bccb11c174b418458491 (patch)
treeae7e094d914eddb8a1ae9548420ba8c2f329ffae /lib/z2.h
parent6e264d243f0b29d90e90b605b6cdeab8227129c9 (diff)
downloadc++-a43ff1f98e9b9814f858bccb11c174b418458491.tar.gz
c++-a43ff1f98e9b9814f858bccb11c174b418458491.tar.bz2
c++-a43ff1f98e9b9814f858bccb11c174b418458491.zip
big rearrangement of files to make libraries and example (research) files clearer, and changed to c++ std lib random numbers
Diffstat (limited to 'lib/z2.h')
-rw-r--r--lib/z2.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/lib/z2.h b/lib/z2.h
deleted file mode 100644
index a18d740..0000000
--- a/lib/z2.h
+++ /dev/null
@@ -1,53 +0,0 @@
-
-#pragma once
-
-#include "types.h"
-#include "ising.h"
-
-/* The minimum definition for a group type R_t to act on a spin type X_t is
- * given by the following.
- *
- * void init(R_t *p);
- * void free_spin(R_t r);
- * R_t copy(R_t r);
- * X_t act(R_t r, X_t x);
- * R_t act(R_t r, R_t r);
- * X_t act_inverse(R_t r, X_t x);
- * R_t act_inverse(R_t r, R_t r);
- *
- */
-
-class z2_t {
- public:
- bool x;
-
- z2_t() : x(false) {}
-
- z2_t(bool x) : x(x) {}
-
- ising_t act(const ising_t& s) const {
- if (x) {
- return ising_t(!s.x);
- } else {
- return ising_t(s.x);
- }
- }
-
- z2_t act(const z2_t& r) const {
- if (x) {
- return z2_t(!r.x);
- } else {
- return z2_t(r.x);
- }
- }
-
- ising_t act_inverse(const ising_t& s) const {
- return this->act(s);
- }
-
- z2_t act_inverse(const z2_t& r) const {
- return this->act(r);
- }
-};
-
-