aboutsummaryrefslogtreecommitdiff
path: root/templates/zmodn-2.cpp
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-01-21 08:03:15 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-01-21 08:03:21 +0100
commit97c94018402c95f2ed1f59645f4b1cbdd255b978 (patch)
tree01143ccecff8b4ac74b233767d380ab4485338ac /templates/zmodn-2.cpp
parent6cfb7b4d8e6b0838bfcde290e5fac18f46f18fb4 (diff)
downloadtaming-cpp-97c94018402c95f2ed1f59645f4b1cbdd255b978.tar.gz
taming-cpp-97c94018402c95f2ed1f59645f4b1cbdd255b978.zip
Final examples for templates
Diffstat (limited to 'templates/zmodn-2.cpp')
-rw-r--r--templates/zmodn-2.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/templates/zmodn-2.cpp b/templates/zmodn-2.cpp
index f96ef8c..d71f2ac 100644
--- a/templates/zmodn-2.cpp
+++ b/templates/zmodn-2.cpp
@@ -15,7 +15,6 @@ public:
15 int value; 15 int value;
16 16
17 Zmod(int z) : value{(z%N + N) % N} {} 17 Zmod(int z) : value{(z%N + N) % N} {}
18 int toint() const { return value; }
19 18
20 Zmod operator+(const Zmod& z) const { return value + z.value; } 19 Zmod operator+(const Zmod& z) const { return value + z.value; }
21 Zmod operator-(const Zmod& z) const { return value - z.value; } 20 Zmod operator-(const Zmod& z) const { return value - z.value; }

Generated with cgit - Back to sebastiano.tronto.net