aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/coord/cpepe.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-08-01 16:52:44 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-08-01 16:52:44 +0200
commit1bd4691d9cc46ec75adbe899b289a1ebc5460721 (patch)
treeea71166e05d399e57a13d6e3d7d96d4737f8f7bd /src/solvers/coord/cpepe.h
parent0844b0ecd00bd6d68a7bafaeae0ee3d420db8ff6 (diff)
downloadnissy-core-1bd4691d9cc46ec75adbe899b289a1ebc5460721.tar.gz
nissy-core-1bd4691d9cc46ec75adbe899b289a1ebc5460721.zip
Added CPEPE coordinate in preparation of full DRFIN solver
Diffstat (limited to 'src/solvers/coord/cpepe.h')
-rw-r--r--src/solvers/coord/cpepe.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/solvers/coord/cpepe.h b/src/solvers/coord/cpepe.h
new file mode 100644
index 0000000..37ec014
--- /dev/null
+++ b/src/solvers/coord/cpepe.h
@@ -0,0 +1,86 @@
1STATIC cube_t coordinate_cpepe_merge(const cube_t, const cube_t);
2STATIC uint64_t coordinate_cpepe_coord(const cube_t, const unsigned char *);
3STATIC cube_t coordinate_cpepe_cube(uint64_t, const unsigned char *);
4STATIC bool coordinate_cpepe_isnasty(uint64_t, const unsigned char *);
5STATIC size_t coordinate_cpepe_gendata(unsigned char *);
6
7STATIC coord_t coordinate_cpepe = {
8 .name = "CPEPE",
9 .coord = &coordinate_cpepe_coord,
10 .cube = &coordinate_cpepe_cube,
11 .isnasty = &coordinate_cpepe_isnasty,
12 .gendata = coordinate_cpepe_gendata,
13 .max = CLASSES_CP_16 * FACT_4,
14 .trans_mask = TM_UDFIX,
15 .moves_mask_gendata = MM18_DR,
16 .moves_mask_solve = MM18_DR,
17 .is_admissible = &solution_always_valid,
18 .is_solvable = &is_drfin_solvable,
19 .is_solved = NULL,
20 .allow_niss = false,
21 .pruning_distribution = {
22 /* TODO */
23 [0] = 0,
24 [1] = 0,
25 [2] = 0,
26 [3] = 0,
27 [4] = 0,
28 [5] = 0,
29 [6] = 0,
30 [7] = 0,
31 [8] = 0,
32 [9] = 0,
33 [10] = 0,
34 [11] = 0,
35 [12] = 0,
36 [13] = 0,
37 [14] = 0,
38 [15] = 0,
39 },
40 .pruning_max = 15, /* TODO */
41 .sym = {
42 .classes = CLASSES_CP_16,
43 .max = FACT_8,
44 .coord = &coord_cp,
45 .cube = &invcoord_cp,
46 .max2 = FACT_4,
47 .coord2 = &coord_epe,
48 .cube2 = &invcoord_epe,
49 .merge = &coordinate_cpepe_merge,
50 },
51};
52
53STATIC cube_t
54coordinate_cpepe_merge(const cube_t c1, const cube_t c2)
55{
56 cube_t merged;
57
58 merged = c1;
59 copy_edges(&merged, c2);
60
61 return merged;
62}
63
64STATIC uint64_t
65coordinate_cpepe_coord(const cube_t cube, const unsigned char *data)
66{
67 return coord_coord_generic(&coordinate_cpepe, cube, data);
68}
69
70STATIC cube_t
71coordinate_cpepe_cube(uint64_t i, const unsigned char *data)
72{
73 return coord_cube_generic(&coordinate_cpepe, i, data);
74}
75
76STATIC bool
77coordinate_cpepe_isnasty(uint64_t i, const unsigned char *data)
78{
79 return coord_isnasty_generic(&coordinate_cpepe, i, data);
80}
81
82STATIC size_t
83coordinate_cpepe_gendata(unsigned char *data)
84{
85 return coord_gendata_generic(&coordinate_cpepe, data);
86}

Generated with cgit - Back to sebastiano.tronto.net