fixed bucketer in H2xE

This commit is contained in:
Zeno Rogue 2020-02-07 19:45:07 +01:00
parent fba1953f63
commit 1acfe8becb
1 changed files with 9 additions and 1 deletions

View File

@ -1205,7 +1205,15 @@ EX int bucketer(ld x) {
}
EX int bucketer(hyperpoint h) {
return bucketer(h[0]) + 1000 * bucketer(h[1]) + 1000000 * bucketer(h[2]);
int dx = 0;
if(prod) {
auto d = product_decompose(h);
h = d.second;
dx += bucketer(d.first) * 50;
}
dx += bucketer(h[0]) + 1000 * bucketer(h[1]) + 1000000 * bucketer(h[2]);
if(MDIM == 4) dx += bucketer(h[3]) * 1000000001;
return dx;
}
}