nissy-core

The "engine" of nissy, including the H48 optimal solver.
git clone https://git.tronto.net/nissy-core
Download | Log | Files | Refs | README | LICENSE

corners.h (1786B)


      1 #define CLASSES_CP_48 984
      2 
      3 STATIC uint64_t coordinate_corners_coord(const cube_t, const unsigned char *);
      4 STATIC cube_t coordinate_corners_cube(uint64_t, const unsigned char *);
      5 STATIC bool coordinate_corners_isnasty(uint64_t, const unsigned char *);
      6 STATIC size_t coordinate_corners_gendata(unsigned char *);
      7 
      8 STATIC coord_t coordinate_corners = {
      9 	.name = "CORNERS",
     10 	.coord = &coordinate_corners_coord,
     11 	.cube = &coordinate_corners_cube,
     12 	.isnasty = &coordinate_corners_isnasty,
     13 	.gendata = coordinate_corners_gendata,
     14 	.max = CLASSES_CP_48 * POW_3_7,
     15 	.trans_mask = TM_ALLTRANS,
     16 	.moves_mask_gendata = MM18_ALLMOVES,
     17 	.moves_mask_solve = MM18_ALLMOVES,
     18 	.is_admissible = &solution_always_valid,
     19 	.solution_prune = NULL,
     20 	.is_solvable = &cube_true,
     21 	.is_solved = NULL,
     22 	.allow_niss = false,
     23 	.pruning_distribution = {
     24 		[0] = 1,
     25 		[1] = 2,
     26 		[2] = 9,
     27 		[3] = 76,
     28 		[4] = 708,
     29 		[5] = 5022,
     30 		[6] = 28248,
     31 		[7] = 132076,
     32 		[8] = 505705,
     33 		[9] = 1102421,
     34 		[10] = 375380,
     35 		[11] = 2360,
     36 	},
     37 	.pruning_max = 11,
     38 	.sym = {
     39 		.classes = CLASSES_CP_48,
     40 		.max = FACT_8,
     41 		.coord = &coord_cp,
     42 		.cube = &invcoord_cp,
     43 		.max2 = POW_3_7,
     44 		.coord2 = &coord_co,
     45 		.cube2 = &invcoord_co,
     46 		.merge = &coordinate_merge_cpco,
     47 	},
     48 };
     49 
     50 STATIC uint64_t
     51 coordinate_corners_coord(const cube_t cube, const unsigned char *data)
     52 {
     53 	return coord_coord_generic(&coordinate_corners, cube, data);
     54 }
     55 
     56 STATIC cube_t
     57 coordinate_corners_cube(uint64_t i, const unsigned char *data)
     58 {
     59 	return coord_cube_generic(&coordinate_corners, i, data);
     60 }
     61 
     62 STATIC bool
     63 coordinate_corners_isnasty(uint64_t i, const unsigned char *data)
     64 {
     65 	return coord_isnasty_generic(&coordinate_corners, i, data);
     66 }
     67 
     68 STATIC size_t
     69 coordinate_corners_gendata(unsigned char *data)
     70 {
     71 	return coord_gendata_generic(&coordinate_corners, data);
     72 }