rough outline

This commit is contained in:
matthias wagner
2023-07-13 22:15:31 +02:00
parent ea096bdec1
commit 643256c4dc

27
thor.c
View File

@@ -3,6 +3,15 @@
// run using gcc thor.c && ./a.out // run using gcc thor.c && ./a.out
struct pc_node {
struct pc_node* sides[6];
}
struct pc {
struct pc_node* head;
unsigned int n;
}
int main(int argc, char **argv){ int main(int argc, char **argv){
if(argc != 2) { if(argc != 2) {
printf("enter one argument for n"); printf("enter one argument for n");
@@ -10,10 +19,22 @@ int main(int argc, char **argv){
} }
unsigned int n = atoi(argv[1]); unsigned int n = atoi(argv[1]);
printf("claculating number y of rotaionally asymmetric polycubes with n = %u ...\n", n); printf("claculating number y of rotaionally asymmetric polycubes with n = %u ...\n", n);
unsigned int y = rot_asy_polyc(n); unsigned int y = rot_asy_pc(n);
printf("y = %u\n", y); printf("y = %u\n", y);
return 0; return 0;
} }
unsigned int rot_asy_polyc(n) { unsigned int rot_asy_pc(n) {
// for all nodes
// for all sides of curr_node counting s
// is the position valid?:
// is the position already occupied?:
// curr_node.sides[s] == 1
// is there another node at the position (maybe space bitmap like in video)
// has the resulting pc already been generated? (lookup table: needs good key generation algorithm / another way to check for symmetries)
// => new pc found
// => increment counter
// opt. add to lookup table
// when done with one layer of n increment n and continue with pcs from lookup table
// => breadth first search
} }