From a125e69c8ce0a2764b1e50b2dad0a4fa9d141ef4 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 6 Sep 2022 18:00:40 +0200 Subject: Symcoord version of nissy. Interesting idea, but performance are actually slower. AT THIS STAGE NISSY IS NOT USABLE. --- src/trans.h | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'src/trans.h') diff --git a/src/trans.h b/src/trans.h index 51df12f..0cc8cef 100644 --- a/src/trans.h +++ b/src/trans.h @@ -3,24 +3,30 @@ #include "moves.h" -/* - * Tables are exposed to allow faster partial transformations in some - * specific cases (in symcoord) - */ -extern int epose_ttable[NTRANS][FACTORIAL12/FACTORIAL8]; -extern int eposs_ttable[NTRANS][FACTORIAL12/FACTORIAL8]; -extern int eposm_ttable[NTRANS][FACTORIAL12/FACTORIAL8]; -extern int eo_ttable[NTRANS][POW2TO11]; -extern int cp_ttable[NTRANS][FACTORIAL8]; -extern int co_ttable[NTRANS][POW3TO7]; -extern int cpos_ttable[NTRANS][FACTORIAL6]; -extern Move moves_ttable[NTRANS][NMOVES]; - -Cube apply_trans(Trans t, Cube cube); +void apply_trans(Trans t, Cube *cube); Trans inverse_trans(Trans t); Alg * rotation_alg(Trans i); -void transform_alg(Trans i, Alg *alg); +void transform_alg(Trans t, Alg *alg); +Move transform_move(Trans t, Move m); +Trans transform_trans(Trans t, Trans m); void init_trans(); +#ifndef TRANS_C + +extern TransGroup tgrp_udfix; + +#else + +TransGroup +tgrp_udfix = { + .n = 16, + .t = { uf, ur, ub, ul, + df, dr, db, dl, + uf_mirror, ur_mirror, ub_mirror, ul_mirror, + df_mirror, dr_mirror, db_mirror, dl_mirror }, +}; + +#endif + #endif -- cgit v1.3