From 4fb67201414169a2687f41c4056b2e284b4938cb Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 11 Nov 2021 22:05:00 +0100 Subject: Removed old files --- old/2021-06-17-cachedata/cubetypes.h | 232 ----------------------------------- 1 file changed, 232 deletions(-) delete mode 100644 old/2021-06-17-cachedata/cubetypes.h (limited to 'old/2021-06-17-cachedata/cubetypes.h') diff --git a/old/2021-06-17-cachedata/cubetypes.h b/old/2021-06-17-cachedata/cubetypes.h deleted file mode 100644 index 4369385..0000000 --- a/old/2021-06-17-cachedata/cubetypes.h +++ /dev/null @@ -1,232 +0,0 @@ -/* Typedefs ******************************************************************/ - -typedef enum center Center; -typedef enum corner Corner; -typedef enum edge Edge; -typedef enum move Move; -typedef enum trans Trans; - -typedef struct alg Alg; -typedef struct alglist AlgList; -typedef struct alglistnode AlgListNode; -typedef struct block Block; -typedef struct cachedata CacheData; -typedef struct cachenode CacheNode; -typedef struct cube Cube; -typedef struct cubearray CubeArray; -typedef struct dfsdata DfsData; -typedef struct piecefilter PieceFilter; -typedef struct prunedata PruneData; -typedef struct solveoptions SolveOptions; -typedef struct step Step; - -typedef int (*Checker)(Cube); -typedef uint64_t (*Indexer)(Cube); -typedef bool (*Moveset)(Move); - - -/* Enums *********************************************************************/ - -enum -center -{ - U_center, D_center, - R_center, L_center, - F_center, B_center -}; - -enum -corner -{ - UFR, UFL, UBL, UBR, - DFR, DFL, DBL, DBR -}; - -enum -edge -{ - UF, UL, UB, UR, - DF, DL, DB, DR, - FR, FL, BL, BR -}; - -enum -move -{ - NULLMOVE, - U, U2, U3, D, D2, D3, - R, R2, R3, L, L2, L3, - F, F2, F3, B, B2, B3, - Uw, Uw2, Uw3, Dw, Dw2, Dw3, - Rw, Rw2, Rw3, Lw, Lw2, Lw3, - Fw, Fw2, Fw3, Bw, Bw2, Bw3, - M, M2, M3, - S, S2, S3, - E, E2, E3, - x, x2, x3, - y, y2, y3, - z, z2, z3, -}; - -enum -trans -{ - uf, ur, ub, ul, - df, dr, db, dl, - rf, rd, rb, ru, - lf, ld, lb, lu, - fu, fr, fd, fl, - bu, br, bd, bl, - mirror, /* R|L */ -}; - - -/* Structs *******************************************************************/ - -struct -alg -{ - Move * move; - bool * inv; - int len; - int allocated; -}; - -struct -alglist -{ - AlgListNode * first; - AlgListNode * last; - int len; -}; - -struct -alglistnode -{ - Alg * alg; - AlgListNode * next; -}; - -struct -block -{ - bool edge[12]; - bool corner[8]; - bool center[6]; -}; - -struct -cachedata -{ - char * filename; - CacheNode ** ctable; - bool generated; - uint64_t maxind0; - int len; - int nind; - Indexer index[20]; /* Should be enough */ - Checker check; - Moveset moveset; -}; - -struct -cachenode -{ - uint64_t * indexval; - Alg * sol; - CacheNode * next; -}; - -struct -cube -{ - uint16_t epose; - uint16_t eposs; - uint16_t eposm; - uint16_t eofb; - uint16_t eorl; - uint16_t eoud; - uint16_t cp; - uint16_t coud; - uint16_t cofb; - uint16_t corl; - uint16_t cpos; -}; - -struct -cubearray -{ - int * ep; - int * eofb; - int * eorl; - int * eoud; - int * cp; - int * coud; - int * corl; - int * cofb; - int * cpos; -}; - -struct -dfsdata -{ - int d; - int m; - bool niss; - Move last1; - Move last2; - AlgList * sols; - Alg * current_alg; - Move sorted_moves[NMOVES]; - int move_position[NMOVES]; -}; - -struct -piecefilter -{ - bool epose; - bool eposs; - bool eposm; - bool eofb; - bool eorl; - bool eoud; - bool cp; - bool coud; - bool cofb; - bool corl; - bool cpos; -}; - -struct -prunedata -{ - char * filename; - uint8_t * ptable; - uint8_t * reached; - bool generated; - uint64_t n; - uint64_t size; - Indexer index; - Moveset moveset; -}; - -struct -solveoptions -{ - int min_moves; - int max_moves; - int max_solutions; - bool optimal_only; - bool can_niss; - bool feedback; - Trans pre_trans; -}; - -struct -step -{ - Checker check; - Checker ready; - Moveset moveset; - CacheData * cd; -}; -- cgit v1.3