From fc242f52e835be85cc6030b6cae5619d18df7670 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 30 Jul 2018 06:32:51 -0400 Subject: various changes --- lib/ising.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/ising.h') diff --git a/lib/ising.h b/lib/ising.h index 473a18a..aaa0c52 100644 --- a/lib/ising.h +++ b/lib/ising.h @@ -53,6 +53,18 @@ class ising_t { return a; } } + + inline int operator-(const ising_t &s) const { + if (x == s.x) { + return 0; + } else { + if (x) { + return -2; + } else { + return 2; + } + } + } }; inline int& operator+=(int& M, const ising_t &s) { -- cgit v1.2.3-70-g09d2