From 95b4257a4df36516e192d72b12da8673f6af3081 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 30 Jul 2018 07:41:23 -0400 Subject: everything builds with new - operators defined --- lib/potts.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/potts.h') diff --git a/lib/potts.h b/lib/potts.h index e6ea636..771c8dc 100644 --- a/lib/potts.h +++ b/lib/potts.h @@ -53,6 +53,16 @@ class potts_t { return result; } + + inline vector_t operator-(const potts_t &s) const { + vector_t result; + result.fill(0); + + result[x]++; + result[s.x]--; + + return result; + } }; template -- cgit v1.2.3-70-g09d2