From 361ecc06948ccebb5bf4fe38bd9acb5f7531bcfa Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 24 Jul 2018 19:36:07 -0400 Subject: added clock model --- lib/dihedral.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/dihedral.h') diff --git a/lib/dihedral.h b/lib/dihedral.h index f547497..8238835 100644 --- a/lib/dihedral.h +++ b/lib/dihedral.h @@ -5,26 +5,26 @@ #include "potts.h" template -struct dihedral2_t { bool is_reflection; T x; }; +struct dihedral_t { bool is_reflection; T x; }; template -void init(dihedral2_t *ptr) { +void init(dihedral_t *ptr) { ptr->is_reflection = false; ptr->x = (T)0; } template -dihedral2_t copy(dihedral2_t r) { +dihedral_t copy(dihedral_t r) { return r; } template -void free_spin(dihedral2_t r) { +void free_spin(dihedral_t r) { // do nothing! } template -potts_t act(dihedral2_t r, potts_t s) { +potts_t act(dihedral_t r, potts_t s) { potts_t s2; if (r.is_reflection) { s2.x = ((q + r.x) - s.x) % q; @@ -36,8 +36,8 @@ potts_t act(dihedral2_t r, potts_t s) { } template -dihedral2_t act(dihedral2_t r1, dihedral2_t r2) { - dihedral2_t r3; +dihedral_t act(dihedral_t r1, dihedral_t r2) { + dihedral_t r3; if (r1.is_reflection) { r3.is_reflection = !(r2.is_reflection); @@ -51,7 +51,7 @@ dihedral2_t act(dihedral2_t r1, dihedral2_t r2) { } template -potts_t act_inverse(dihedral2_t r, potts_t s) { +potts_t act_inverse(dihedral_t r, potts_t s) { potts_t s2; if (r.is_reflection) { s2.x = ((r.x + q) - s.x) % q; @@ -63,8 +63,8 @@ potts_t act_inverse(dihedral2_t r, potts_t s) { } template -dihedral2_t act_inverse(dihedral2_t r1, dihedral2_t r2) { - dihedral2_t r3; +dihedral_t act_inverse(dihedral_t r1, dihedral_t r2) { + dihedral_t r3; if (r1.is_reflection) { r3.is_reflection = !(r2.is_reflection); -- cgit v1.2.3-70-g09d2