summaryrefslogtreecommitdiff
path: root/euclidean.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'euclidean.hpp')
-rw-r--r--euclidean.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/euclidean.hpp b/euclidean.hpp
index 49ec2d9..b1ce2c6 100644
--- a/euclidean.hpp
+++ b/euclidean.hpp
@@ -95,6 +95,16 @@ public:
return s_new;
}
+ Vector<T, D> act(const Vector<T, D>& s) const {
+ Vector<T, D> s_new = t + r * s;
+
+ for (unsigned i = 0; i < D; i++) {
+ s_new(i) = fmod(L + s_new(i), L);
+ }
+
+ return s_new;
+ }
+
TorusGroup act(const TorusGroup& x) const {
Vector<T, D> tnew = r * x.t + t;
Matrix<T, D> rnew = r * x.r;