protected static void initCPermMove() { CubieCube c = new CubieCube(); CubieCube d = new CubieCube(); for (int i = 0; i < N_PERM_SYM; i++) { c.setCPerm(CubieCube.EPermS2R[i]); for (int j = 0; j < N_MOVES; j++) { CubieCube.CornMult(c, CubieCube.moveCube[j], d); CPermMove[i, j] = (char)d.getCPermSym(); } } }
private void initSearch() { conjMask = (TRY_INVERSE ? 0 : 0x38) | (TRY_THREE_AXES ? 0 : 0x36); CubieCube pc = new CubieCube(); selfSym = cc.selfSymmetry(); if (selfSym >> 48 != 0) { conjMask |= 0x38; } if ((selfSym >> 16 & 0xffff) != 0) { conjMask |= 0x12; } if ((selfSym >> 32 & 0xffff) != 0) { conjMask |= 0x24; } preIdxMax = conjMask > 7 ? 1 : PRE_IDX_MAX; for (int i = 0; i < 6; i++) { node0[i, 0].set(cc); corn0[i, 0] = cc.getCPermSym(); ud8e0[i, 0] = cc.getU4Comb() << 16 | cc.getD4Comb(); if ((conjMask & 1 << i) == 0) { for (int j = 1; j < preIdxMax; j++) { CubieCube.CornMult(CubieCube.moveCube[CubieCube.preMove[j]], cc, pc); CubieCube.EdgeMult(CubieCube.moveCube[CubieCube.preMove[j]], cc, pc); node0[i, j].set(pc); corn0[i, j] = pc.getCPermSym(); ud8e0[i, j] = pc.getU4Comb() << 16 | pc.getD4Comb(); } } cc.URFConjugate(); if (i % 3 == 2) { cc.invCubieCube(); } } selfSym = selfSym & 0xffffffffffffL; }