summaryrefslogtreecommitdiff
path: root/lib/symmetric.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/symmetric.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/symmetric.h')
-rw-r--r--lib/symmetric.h51
1 files changed, 0 insertions, 51 deletions
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 <stdlib.h>
-#include <array>
-#include "types.h"
-#include "potts.h"
-
-template <q_t q>
-class symmetric_t : public std::array<q_t, q> {
- public:
-
- symmetric_t() {
- for (q_t i = 0; i < q; i++) {
- (*this)[i] = i;
- }
- }
-
- potts_t<q> act(const potts_t<q> &s) const {
- return potts_t<q>((*this)[s.x]);
- }
-
- symmetric_t<q> act(const symmetric_t<q>& r) const {
- symmetric_t<q> r_rot;
- for (q_t i = 0; i < q; i++) {
- r_rot[i] = (*this)[r[i]];
- }
-
- return r_rot;
- }
-
- potts_t<q> act_inverse(const potts_t<q>& s) const {
- for (q_t i = 0; i < q; i++) {
- if ((*this)[i] == s.x) {
- return potts_t<q>(i);
- }
- }
-
- exit(EXIT_FAILURE);
- }
-
- symmetric_t<q> act_inverse(const symmetric_t<q>& r) const {
- symmetric_t<q> r_rot;
- for (q_t i = 0; i < q; i++) {
- r_rot[(*this)[i]] = r[i];
- }
-
- return r_rot;
- }
-};
-