summaryrefslogtreecommitdiff
path: root/lib/z2.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 16:55:17 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 16:55:17 -0400
commit5f1eb9a12821e7462b7b2853e0d95c8c863bf900 (patch)
tree6aa091a95846923e253a83886c5da2a8a62d5e93 /lib/z2.h
parent1160baa61bad605cf8a1d583e8ae356a54a942df (diff)
downloadc++-5f1eb9a12821e7462b7b2853e0d95c8c863bf900.tar.gz
c++-5f1eb9a12821e7462b7b2853e0d95c8c863bf900.tar.bz2
c++-5f1eb9a12821e7462b7b2853e0d95c8c863bf900.zip
now using const passing of object reference instead of pointers
Diffstat (limited to 'lib/z2.h')
-rw-r--r--lib/z2.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/z2.h b/lib/z2.h
index fd4722e..a18d740 100644
--- a/lib/z2.h
+++ b/lib/z2.h
@@ -25,7 +25,7 @@ class z2_t {
z2_t(bool x) : x(x) {}
- ising_t act(const ising_t& s) {
+ ising_t act(const ising_t& s) const {
if (x) {
return ising_t(!s.x);
} else {
@@ -33,7 +33,7 @@ class z2_t {
}
}
- z2_t act(const z2_t& r) {
+ z2_t act(const z2_t& r) const {
if (x) {
return z2_t(!r.x);
} else {
@@ -41,11 +41,11 @@ class z2_t {
}
}
- ising_t act_inverse(const ising_t& s) {
+ ising_t act_inverse(const ising_t& s) const {
return this->act(s);
}
- z2_t act_inverse(const z2_t& r) {
+ z2_t act_inverse(const z2_t& r) const {
return this->act(r);
}
};