mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	reg3:: faster va analysis
This commit is contained in:
		
							
								
								
									
										8
									
								
								reg3.cpp
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								reg3.cpp
									
									
									
									
									
								
							| @@ -712,6 +712,10 @@ EX namespace reg3 { | |||||||
|     for(int a=0; a<isize(allh); a++) { |     for(int a=0; a<isize(allh); a++) { | ||||||
|       auto& va = vas[a]; |       auto& va = vas[a]; | ||||||
|       va.emplace_back(vertex_adjacency_info{a, Id, {}}); |       va.emplace_back(vertex_adjacency_info{a, Id, {}}); | ||||||
|  |        | ||||||
|  |       set<unsigned> buckets; | ||||||
|  |       for(auto& v: cgi.vertices_only) buckets.insert(bucketer(v)); | ||||||
|  |  | ||||||
|       if(cgflags & qIDEAL) { |       if(cgflags & qIDEAL) { | ||||||
|         for(int d=0; d<S7; d++) { |         for(int d=0; d<S7; d++) { | ||||||
|           transmatrix T = adj(allh[a], d); |           transmatrix T = adj(allh[a], d); | ||||||
| @@ -727,8 +731,8 @@ EX namespace reg3 { | |||||||
|           if(found) continue; |           if(found) continue; | ||||||
|  |  | ||||||
|           bool found_va = false; |           bool found_va = false; | ||||||
|           for(auto& v: cgi.vertices_only) for(auto& w: cgi.vertices_only) |           for(auto& w: cgi.vertices_only) | ||||||
|             if(hdist(normalize(v), normalize(T*w)) < 1e-3) |             if(buckets.count(bucketer(T*w))) | ||||||
|               found_va = true; |               found_va = true; | ||||||
|           if(sphere) found_va = true; |           if(sphere) found_va = true; | ||||||
|           if(!found_va) continue; |           if(!found_va) continue; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue