From 3b8b100ad5c1e0571c319fd51fa85a604e6aa338 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 14 Jan 2018 02:59:57 +0100 Subject: [PATCH] fixed the octagons-fieldquotient geometry --- cell.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cell.cpp b/cell.cpp index 7060f962..5d190a25 100644 --- a/cell.cpp +++ b/cell.cpp @@ -541,16 +541,16 @@ heptagon* encodeId(int id) { namespace quotientspace { struct code { - int c[8]; + int c[MAX_EDGE+1]; }; bool operator == (const code& c1, const code &c2) { - for(int i=0; i<8; i++) if(c1.c[i] != c2.c[i]) return false; + for(int i=0; i<=S7; i++) if(c1.c[i] != c2.c[i]) return false; return true; } bool operator < (const code& c1, const code &c2) { - for(int i=0; i<8; i++) if(c1.c[i] != c2.c[i]) return c1.c[i] < c2.c[i]; + for(int i=0; i<=S7; i++) if(c1.c[i] != c2.c[i]) return c1.c[i] < c2.c[i]; return false; } @@ -561,7 +561,7 @@ namespace quotientspace { code get(heptspin hs) { code res; res.c[0] = cod(hs.h); - for(int i=1; i<8; i++) { + for(int i=1; i<=S7; i++) { res.c[i] = cod(hsstep(hs, 0).h); hs = hsspin(hs, 1); } @@ -570,7 +570,7 @@ namespace quotientspace { int rvadd = 0, rvdir = 1; - int rv(int x) { return (rvadd+x*rvdir) % 7; } + int rv(int x) { return (rvadd+x*rvdir) % S7; } struct hrmap_quotient : hrmap {