mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
cellrotations are now structs, and include inverses
This commit is contained in:
parent
7fd199dd49
commit
100b8f3534
@ -633,7 +633,7 @@ struct hrmap_crystal : hrmap_standard {
|
||||
|
||||
for(auto& cr: cgi.cellrotations) {
|
||||
|
||||
transmatrix U = T * cr.first;
|
||||
transmatrix U = T * cr.M;
|
||||
|
||||
ld go = hdist0(U * tC0(reg3::adjmoves[h->c.spin(d)]));
|
||||
if(go > 1e-2) continue;
|
||||
|
@ -294,7 +294,13 @@ hpcshape
|
||||
|
||||
vector<array<int, 3>> symmetriesAt;
|
||||
|
||||
vector<pair<transmatrix, vector<int> > > cellrotations;
|
||||
struct cellrotation_t {
|
||||
transmatrix M;
|
||||
vector<int> mapping;
|
||||
int inverse_id;
|
||||
};
|
||||
|
||||
vector<cellrotation_t> cellrotations;
|
||||
|
||||
#ifndef SCALETUNER
|
||||
static constexpr
|
||||
|
7
reg3.cpp
7
reg3.cpp
@ -1267,9 +1267,14 @@ EX void generate_cellrotations() {
|
||||
for(int x=0; x<S7; x++) if(perm[x] == -1) bad = true;
|
||||
if(bad) continue;
|
||||
|
||||
cr.emplace_back(S, perm);
|
||||
cr.emplace_back(geometry_information::cellrotation_t{S, perm, 0});
|
||||
}
|
||||
|
||||
int rots = isize(cr);
|
||||
for(int i=0; i<rots; i++)
|
||||
for(int j=0; j<rots; j++)
|
||||
if(cr[i].mapping[cr[j].mapping[0]] == 0 && cr[i].mapping[cr[j].mapping[1]] == 1 && cr[i].mapping[cr[j].mapping[2]] == 2)
|
||||
cr[i].inverse_id = j;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user