From b7b4a7f07b5db23eae48a4b1181f8e1369ef8cb8 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Debias Date: Mon, 28 Oct 2019 16:15:03 -0400 Subject: made the label of the position type consistent --- space_wolff.hpp | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/space_wolff.hpp b/space_wolff.hpp index 6ac9788..4c02406 100644 --- a/space_wolff.hpp +++ b/space_wolff.hpp @@ -29,12 +29,12 @@ const std::array, 16> smiley = { {{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0}}, {{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}}}}; -template using vector = Eigen::Matrix; +template using vector = Eigen::Matrix; -template using matrix = Eigen::Matrix; +template using matrix = Eigen::Matrix; -template vector diff(T L, vector v1, vector v2) { - vector v; +template vector diff(U L, vector v1, vector v2) { + vector v; for (unsigned i = 0; i < D; i++) { v(i) = std::abs(v1(i) - v2(i)); @@ -46,20 +46,20 @@ template vector diff(T L, vector v1, vector v return v; } -template class spin { +template class spin { public: - vector x; + vector x; state s; }; -template class euclidean { +template class euclidean { private: - T L; + U L; public: - vector t; - matrix r; - euclidean(T L) : L(L) { + vector t; + matrix r; + euclidean(U L) : L(L) { for (unsigned i = 0; i < D; i++) { t(i) = 0; r(i, i) = 1; @@ -69,13 +69,14 @@ public: } } - euclidean(T L, vector t0, matrix r0) : L(L) { + euclidean(U L, vector t0, matrix r0) : L(L) { t = t0; r = r0; } - template spin act(const spin& s) const { - spin s_new; + template + spin act(const spin &s) const { + spin s_new; s_new.x = t + r * s.x; s_new.s = s.s; @@ -88,8 +89,8 @@ public: } euclidean act(const euclidean& x) const { - vector tnew = r * x.t + t; - matrix rnew = r * x.r; + vector tnew = r * x.t + t; + matrix rnew = r * x.r; for (unsigned i = 0; i < D; i++) { tnew(i) = fmod(L + tnew(i), L); @@ -101,8 +102,8 @@ public: } euclidean inverse() const { - vector tnew = -r.transpose() * t; - matrix rnew = r.transpose(); + vector tnew = -r.transpose() * t; + matrix rnew = r.transpose(); euclidean pnew(this->L, tnew, rnew); @@ -110,7 +111,7 @@ public: } }; -template class dictionary { +template class dictionary { private: unsigned N; T L; @@ -243,7 +244,7 @@ public: unsigned num_added() const { return n - wait; } }; -template class model { +template class model { public: U L; euclidean s0; -- cgit v1.2.3-70-g09d2