예제 #1
0
 internal int GetCPermSym()
 {
     if (EPermR2S != null)
     {
         int idx = EPermR2S[GetCPerm()];
         idx ^= E2C[idx & 0x0f];
         return(idx);
     }
     if (temps == null)
     {
         temps = new CubieCube();
     }
     for (int k = 0; k < 16; k++)
     {
         CornConjugate(this, SymInv[k], temps);
         int idx = Util.BinarySearch(EPermS2R, temps.GetCPerm());
         if (idx != 0xffff)
         {
             return((idx << 4) | k);
         }
     }
     return(0);
 }