From a43ff1f98e9b9814f858bccb11c174b418458491 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 10 Oct 2018 21:45:32 -0400 Subject: big rearrangement of files to make libraries and example (research) files clearer, and changed to c++ std lib random numbers --- lib/symmetric.h | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 lib/symmetric.h (limited to 'lib/symmetric.h') diff --git a/lib/symmetric.h b/lib/symmetric.h deleted file mode 100644 index 9e9b6e4..0000000 --- a/lib/symmetric.h +++ /dev/null @@ -1,51 +0,0 @@ - -#pragma once - -#include -#include -#include "types.h" -#include "potts.h" - -template -class symmetric_t : public std::array { - public: - - symmetric_t() { - for (q_t i = 0; i < q; i++) { - (*this)[i] = i; - } - } - - potts_t act(const potts_t &s) const { - return potts_t((*this)[s.x]); - } - - symmetric_t act(const symmetric_t& r) const { - symmetric_t r_rot; - for (q_t i = 0; i < q; i++) { - r_rot[i] = (*this)[r[i]]; - } - - return r_rot; - } - - potts_t act_inverse(const potts_t& s) const { - for (q_t i = 0; i < q; i++) { - if ((*this)[i] == s.x) { - return potts_t(i); - } - } - - exit(EXIT_FAILURE); - } - - symmetric_t act_inverse(const symmetric_t& r) const { - symmetric_t r_rot; - for (q_t i = 0; i < q; i++) { - r_rot[(*this)[i]] = r[i]; - } - - return r_rot; - } -}; - -- cgit v1.2.3-70-g09d2