mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 22:12:59 +00:00 
			
		
		
		
	cellrotations are now structs, and include inverses
This commit is contained in:
		| @@ -633,7 +633,7 @@ struct hrmap_crystal : hrmap_standard { | |||||||
|  |  | ||||||
|     for(auto& cr: cgi.cellrotations) { |     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)])); |       ld go = hdist0(U * tC0(reg3::adjmoves[h->c.spin(d)])); | ||||||
|       if(go > 1e-2) continue; |       if(go > 1e-2) continue; | ||||||
|   | |||||||
| @@ -294,7 +294,13 @@ hpcshape | |||||||
|    |    | ||||||
|   vector<array<int, 3>> symmetriesAt; |   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 |   #ifndef SCALETUNER | ||||||
|   static constexpr |   static constexpr | ||||||
|   | |||||||
							
								
								
									
										9
									
								
								reg3.cpp
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								reg3.cpp
									
									
									
									
									
								
							| @@ -1267,9 +1267,14 @@ EX void generate_cellrotations() { | |||||||
|     for(int x=0; x<S7; x++) if(perm[x] == -1) bad = true; |     for(int x=0; x<S7; x++) if(perm[x] == -1) bad = true; | ||||||
|     if(bad) continue; |     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 | #endif | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue