aboutsummaryrefslogtreecommitdiff
path: root/old/2021-06-17-cachedata/cube.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 22:05:00 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 22:05:00 +0100
commit4fb67201414169a2687f41c4056b2e284b4938cb (patch)
treea68246e3e21435229541f83f485ab41cfb2ba08a /old/2021-06-17-cachedata/cube.h
parent3568412f8f230774d0d11d7ed1c897424f95d3ef (diff)
downloadnissy-4fb67201414169a2687f41c4056b2e284b4938cb.tar.gz
nissy-4fb67201414169a2687f41c4056b2e284b4938cb.zip
Removed old files
Diffstat (limited to '')
-rw-r--r--old/2021-06-17-cachedata/cube.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/old/2021-06-17-cachedata/cube.h b/old/2021-06-17-cachedata/cube.h
deleted file mode 100644
index d233165..0000000
--- a/old/2021-06-17-cachedata/cube.h
+++ /dev/null
@@ -1,79 +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 POW2TO11 2048ULL
16#define POW2TO12 4096ULL
17#define POW3TO7 2187ULL
18#define POW3TO8 6561ULL
19#define FACTORIAL4 24ULL
20#define FACTORIAL6 720ULL
21#define FACTORIAL8 40320ULL
22#define FACTORIAL12 479001600ULL
23#define BINOM12ON4 495ULL
24#define BINOM8ON4 70ULL
25#define MIN(a,b) (((a) < (b)) ? (a) : (b))
26#define MAX(a,b) (((a) > (b)) ? (a) : (b))
27
28#define NMOVES (z3+1)
29#define NTRANS (mirror+1)
30#define NROTATIONS (NTRANS-1)
31#define PTABLESIZE(n) ((n+1) / 2)
32#define PTABLEVAL(t,i) (((i)%2) ? (t[(i)/2] / 16) : (t[(i)/2] % 16))
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);
44Center center_at(Cube cube, Center c);
45Cube compose(Cube c2, Cube c1); /* Use c2 as an alg on c1 */
46Corner corner_at(Cube cube, Corner c);
47Edge edge_at(Cube cube, Edge e);
48uint64_t epos_dependent_cube(Cube cube);
49bool equal(Cube c1, Cube c2);
50Cube inverse_cube(Cube cube);
51Move inverse_move(Move m);
52Trans inverse_trans(Trans t);
53bool is_admissible(Cube cube);
54bool is_solved(Cube cube, bool reorient);
55int piece_orientation(Cube cube, int piece, char *orientation);
56void print_cube(Cube cube);
57Cube random_cube();
58AlgList * solve(Cube cube, Step step, SolveOptions *opts);
59
60Move base_move(Move m);
61void free_alg(Alg *alg);
62void free_alglist(AlgList *l);
63Alg * inverse_alg(Alg *alg);
64Alg * new_alg(char *str);
65Alg * on_inverse(Alg *alg);
66void print_alg(Alg *alg, bool l);
67void print_alglist(AlgList *al, bool l);
68Alg * trans_alg(Trans i);
69void transform_alg(Trans t, Alg *alg);
70
71void generate_ctable(CacheData *cd);
72void generate_ptable(PruneData *pd);
73void print_cachedata(CacheData *cd, bool printalgs);
74void print_ptable(PruneData *pd);
75
76void init();
77
78#endif
79

Generated with cgit - Back to sebastiano.tronto.net