aboutsummaryrefslogtreecommitdiff
path: root/old/2021-06-23-uint16t/cube.h
diff options
context:
space:
mode:
Diffstat (limited to 'old/2021-06-23-uint16t/cube.h')
-rw-r--r--old/2021-06-23-uint16t/cube.h87
1 files changed, 0 insertions, 87 deletions
diff --git a/old/2021-06-23-uint16t/cube.h b/old/2021-06-23-uint16t/cube.h
deleted file mode 100644
index 74d14cc..0000000
--- a/old/2021-06-23-uint16t/cube.h
+++ /dev/null
@@ -1,87 +0,0 @@
1#ifndef CUBE_H
2#define CUBE_H
3
4#include <stdio.h>
5#include <stdbool.h>
6#include <stdint.h>
7#include <stdlib.h>
8#include <string.h>
9#include <time.h>
10#include <unistd.h>
11#include <sys/stat.h>
12
13/* Constants and macros *****************************************************/
14
15#define POW2TO6 64ULL
16#define POW2TO11 2048ULL
17#define POW2TO12 4096ULL
18#define POW3TO7 2187ULL
19#define POW3TO8 6561ULL
20#define FACTORIAL4 24ULL
21#define FACTORIAL6 720ULL
22#define FACTORIAL7 5040ULL
23#define FACTORIAL8 40320ULL
24#define FACTORIAL12 479001600ULL
25#define BINOM12ON4 495ULL
26#define BINOM8ON4 70ULL
27#define MIN(a,b) (((a) < (b)) ? (a) : (b))
28#define MAX(a,b) (((a) > (b)) ? (a) : (b))
29
30#define NMOVES (z3+1)
31#define NTRANS (mirror+1)
32#define NROTATIONS (NTRANS-1)
33
34/* Type definitions **********************************************************/
35
36#include "cubetypes.h"
37
38/* Public functions **********************************************************/
39
40Cube apply_alg(Alg *alg, Cube cube);
41Cube apply_move(Move m, Cube cube);
42Cube apply_trans(Trans t, Cube cube);
43bool block_solved(Cube cube, Block);
44Cube compose(Cube c2, Cube c1); /* Use c2 as an alg on c1 */
45uint64_t epos_dependent_cube(Cube cube);
46bool equal(Cube c1, Cube c2);
47Cube inverse_cube(Cube cube);
48Move inverse_move(Move m);
49Trans inverse_trans(Trans t);
50bool is_admissible(Cube cube);
51bool is_solved(Cube cube, bool reorient);
52bool is_solved_center(Cube cube, Center c);
53bool is_solved_corner(Cube cube, Corner c);
54bool is_solved_edge(Cube cube, Edge e);
55void print_cube(Cube cube);
56Cube random_cube();
57AlgList * solve(Cube cube, Step step, SolveOptions *opts);
58Center what_center_at(Cube cube, Center c);
59Corner what_corner_at(Cube cube, Corner c);
60Edge what_edge_at(Cube cube, Edge e);
61int what_orientation_corner(int co, Corner c);
62int what_orientation_edge(int eo, Edge e);
63Center where_is_center(Cube cube, Center c);
64Corner where_is_corner(Cube cube, Corner c);
65Edge where_is_edge(Cube cube, Edge e);
66
67Move base_move(Move m);
68void free_alg(Alg *alg);
69void free_alglist(AlgList *l);
70Alg * inverse_alg(Alg *alg);
71Alg * new_alg(char *str);
72Alg * on_inverse(Alg *alg);
73void print_alg(Alg *alg, bool l);
74void print_alglist(AlgList *al, bool l);
75Alg * trans_alg(Trans i);
76void transform_alg(Trans t, Alg *alg);
77
78void genalgset(AlgSet *as);
79void genptable(PruneData *pd);
80void print_ptable(PruneData *pd);
81uint64_t ptablesize(PruneData *pd);
82int ptableval(PruneData *pd, uint64_t ind);
83
84void init();
85
86#endif
87

Generated with cgit - Back to sebastiano.tronto.net