private static void BuildCornerSymGroup() { cornerSymGroup = new int[40320]; symGroupMembers = new int[10368][]; for (int i = 0; i < cornerSymGroup.Length; i++) { cornerSymGroup[i] = -1; } int numGroups = 0; Cube c = new Cube(); for (int i = 0; i < cornerSymGroup.Length; i++) { if (cornerSymGroup[i] < 0) { c.SetCornerPermutationFromIndex(i); int s0 = c.GetCornerPermutationIndex(); c.MirrorUD(); int ud = c.GetCornerPermutationIndex(); c.MirrorLR(); int ud_lr = c.GetCornerPermutationIndex(); c.MirrorUD(); int lr = c.GetCornerPermutationIndex(); c.MirrorLR(); if (s0 != c.GetCornerPermutationIndex() || i != s0) { Console.WriteLine("ERROR: symmetry action do not match original situation!"); } int g = numGroups++; if (cornerSymGroup[s0] >= 0 || cornerSymGroup[ud] >= 0 || cornerSymGroup[lr] >= 0 || cornerSymGroup[ud_lr] >= 0 ) { Console.WriteLine("ERROR: Overwriting symmetry group member"); } cornerSymGroup[s0] = g; cornerSymGroup[ud] = g; cornerSymGroup[lr] = g; cornerSymGroup[ud_lr] = g; symGroupMembers[g] = new int[] { s0, ud, lr, ud_lr }; // Console.Write(g + ": " + s0 + " " + ud + " " + lr + " " + ud_lr + " "); // Console.WriteLine(); } } }
private static void BuildTwistSymGroup() { twistSymGroup = new int[2187]; symGroupMembers = new int[594][]; for (int i = 0; i < twistSymGroup.Length; i++) { twistSymGroup[i] = -1; } int numGroups = 0; Cube c = new Cube(); for (int i = 0; i < twistSymGroup.Length; i++) { if (twistSymGroup[i] < 0) { c.SetCornerTwistFromIndex(i); int s0 = c.GetCornerTwistIndex(); c.MirrorUD(); int ud = c.GetCornerTwistIndex(); c.MirrorLR(); int ud_lr = c.GetCornerTwistIndex(); c.MirrorUD(); int lr = c.GetCornerTwistIndex(); c.MirrorLR(); if (s0 != c.GetCornerTwistIndex() || i != s0) { Console.WriteLine("ERROR: symmetry action do not match original situation!"); } int g = numGroups++; if (twistSymGroup[s0] >= 0 || twistSymGroup[ud] >= 0 || twistSymGroup[lr] >= 0 || twistSymGroup[ud_lr] >= 0) { Console.WriteLine("ERROR: Overwriting symmetry group member"); } twistSymGroup[s0] = g; twistSymGroup[ud] = g; twistSymGroup[lr] = g; twistSymGroup[ud_lr] = g; symGroupMembers[g] = new int[] { s0, ud, lr, ud_lr }; // Console.Write(g + ": " + s0 + " " + ud+ " " + lr+ " " + ud_lr + " "); // if ((numGroups % 2) == 0) Console.WriteLine(); } } }
private static void BuildSymmetricalIndizes() { Cube c = new Cube(); symOuterEdgePermutationIndex = new int[40320][]; for (int i = 0; i < symOuterEdgePermutationIndex.Length; i++) { c.SetOuterEdgePermutationFromIndex(i); int s0 = c.GetOuterEdgePermutationIndex(); c.MirrorUD(); int ud = c.GetOuterEdgePermutationIndex(); c.MirrorLR(); int ud_lr = c.GetOuterEdgePermutationIndex(); c.MirrorUD(); int lr = c.GetOuterEdgePermutationIndex(); c.MirrorLR(); if (i != s0 || i != c.GetOuterEdgePermutationIndex()) { Console.WriteLine("outer edge permutation mirror calcuation error"); } symOuterEdgePermutationIndex[i] = new int[] { s0, ud, lr, ud_lr }; } symMiddleEdgePermutationIndex = new int[24][]; for (int i = 0; i < symMiddleEdgePermutationIndex.Length; i++) { c.SetMiddleEdgePermutationFromIndex(i); int s0 = c.GetMiddleEdgePermutationIndex(); c.MirrorUD(); int ud = c.GetMiddleEdgePermutationIndex(); c.MirrorLR(); int ud_lr = c.GetMiddleEdgePermutationIndex(); c.MirrorUD(); int lr = c.GetMiddleEdgePermutationIndex(); c.MirrorLR(); if (i != s0 || i != c.GetMiddleEdgePermutationIndex()) { Console.WriteLine("Middle Edge Permutation mirror calcuation error: " + i + "!=" + s0); } symMiddleEdgePermutationIndex[i] = new int[] { s0, ud, lr, ud_lr }; } }
private static void BuildSymmetricalIndizes() { Cube c = new Cube(); symEdgeFlipIndex = new int[2048][]; for (int i = 0; i < symEdgeFlipIndex.Length; i++) { c.SetEdgeFlipFromIndex(i); int s0 = c.GetEdgeFlipIndex(); c.MirrorUD(); int ud = c.GetEdgeFlipIndex(); c.MirrorLR(); int ud_lr = c.GetEdgeFlipIndex(); c.MirrorUD(); int lr = c.GetEdgeFlipIndex(); c.MirrorLR(); if (i != s0 || i != c.GetEdgeFlipIndex()) { Console.WriteLine("Edge flip mirror calcuation error"); } symEdgeFlipIndex[i] = new int[] { s0, ud, lr, ud_lr }; } symMiddleEdgeDistributionIndex = new int[495][]; for (int i = 0; i < symMiddleEdgeDistributionIndex.Length; i++) { c.SetMiddleEdgeDistributionFromIndex(i); int s0 = c.GetMiddleEdgeDistributionIndex(); c.MirrorUD(); int ud = c.GetMiddleEdgeDistributionIndex(); c.MirrorLR(); int ud_lr = c.GetMiddleEdgeDistributionIndex(); c.MirrorUD(); int lr = c.GetMiddleEdgeDistributionIndex(); c.MirrorLR(); if (i != s0 || i != c.GetMiddleEdgeDistributionIndex()) { Console.WriteLine("Middle Edge Distribution mirror calcuation error: " + i + "!=" + s0); } symMiddleEdgeDistributionIndex[i] = new int[] { s0, ud, lr, ud_lr }; } }
private static void BuildTwistSymGroup() { twistSymGroup = new int[2187]; symGroupMembers = new int[594][]; for (int i = 0; i < twistSymGroup.Length; i++) { twistSymGroup[i] = -1; } int numGroups = 0; Cube c = new Cube(); for (int i=0; i<twistSymGroup.Length; i++) { if (twistSymGroup[i]<0) { c.SetCornerTwistFromIndex(i); int s0 = c.GetCornerTwistIndex(); c.MirrorUD(); int ud = c.GetCornerTwistIndex(); c.MirrorLR(); int ud_lr = c.GetCornerTwistIndex(); c.MirrorUD(); int lr = c.GetCornerTwistIndex(); c.MirrorLR(); if (s0!=c.GetCornerTwistIndex() || i!=s0) { Console.WriteLine("ERROR: symmetry action do not match original situation!"); } int g = numGroups++; if (twistSymGroup[s0] >= 0 || twistSymGroup[ud]>=0 || twistSymGroup[lr]>=0 || twistSymGroup[ud_lr]>= 0) { Console.WriteLine("ERROR: Overwriting symmetry group member"); } twistSymGroup[s0] = g; twistSymGroup[ud] = g; twistSymGroup[lr] = g; twistSymGroup[ud_lr] = g; symGroupMembers[g] = new int[] { s0, ud, lr, ud_lr }; // Console.Write(g + ": " + s0 + " " + ud+ " " + lr+ " " + ud_lr + " "); // if ((numGroups % 2) == 0) Console.WriteLine(); } } }
private static void BuildSymmetricalIndizes() { Cube c = new Cube(); symEdgeFlipIndex = new int[2048][]; for (int i = 0; i < symEdgeFlipIndex.Length; i++) { c.SetEdgeFlipFromIndex(i); int s0 = c.GetEdgeFlipIndex(); c.MirrorUD(); int ud = c.GetEdgeFlipIndex(); c.MirrorLR(); int ud_lr = c.GetEdgeFlipIndex(); c.MirrorUD(); int lr = c.GetEdgeFlipIndex(); c.MirrorLR(); if (i != s0 || i!=c.GetEdgeFlipIndex()) { Console.WriteLine("Edge flip mirror calcuation error"); } symEdgeFlipIndex[i] = new int[] { s0, ud, lr, ud_lr }; } symMiddleEdgeDistributionIndex = new int[495][]; for (int i = 0; i < symMiddleEdgeDistributionIndex.Length; i++) { c.SetMiddleEdgeDistributionFromIndex(i); int s0 = c.GetMiddleEdgeDistributionIndex(); c.MirrorUD(); int ud = c.GetMiddleEdgeDistributionIndex(); c.MirrorLR(); int ud_lr = c.GetMiddleEdgeDistributionIndex(); c.MirrorUD(); int lr = c.GetMiddleEdgeDistributionIndex(); c.MirrorLR(); if (i != s0 || i != c.GetMiddleEdgeDistributionIndex()) { Console.WriteLine("Middle Edge Distribution mirror calcuation error: "+i+"!="+s0); } symMiddleEdgeDistributionIndex[i] = new int[] { s0, ud, lr, ud_lr }; } }
private static void BuildSymmetricalIndizes() { Cube c = new Cube(); symOuterEdgePermutationIndex = new int[40320][]; for (int i = 0; i < symOuterEdgePermutationIndex.Length; i++) { c.SetOuterEdgePermutationFromIndex(i); int s0 = c.GetOuterEdgePermutationIndex(); c.MirrorUD(); int ud = c.GetOuterEdgePermutationIndex(); c.MirrorLR(); int ud_lr = c.GetOuterEdgePermutationIndex(); c.MirrorUD(); int lr = c.GetOuterEdgePermutationIndex(); c.MirrorLR(); if (i != s0 || i != c.GetOuterEdgePermutationIndex()) { Console.WriteLine("outer edge permutation mirror calcuation error"); } symOuterEdgePermutationIndex[i] = new int[] { s0, ud, lr, ud_lr }; } symMiddleEdgePermutationIndex = new int[24][]; for (int i = 0; i < symMiddleEdgePermutationIndex.Length; i++) { c.SetMiddleEdgePermutationFromIndex(i); int s0 = c.GetMiddleEdgePermutationIndex(); c.MirrorUD(); int ud = c.GetMiddleEdgePermutationIndex(); c.MirrorLR(); int ud_lr = c.GetMiddleEdgePermutationIndex(); c.MirrorUD(); int lr = c.GetMiddleEdgePermutationIndex(); c.MirrorLR(); if (i != s0 || i != c.GetMiddleEdgePermutationIndex()) { Console.WriteLine("Middle Edge Permutation mirror calcuation error: " + i + "!=" + s0); } symMiddleEdgePermutationIndex[i] = new int[] { s0, ud, lr, ud_lr }; } }
private static void BuildCornerSymGroup() { cornerSymGroup = new int[40320]; symGroupMembers = new int[10368][]; for (int i = 0; i < cornerSymGroup.Length; i++) { cornerSymGroup[i] = -1; } int numGroups = 0; Cube c = new Cube(); for (int i = 0; i < cornerSymGroup.Length; i++) { if (cornerSymGroup[i] < 0) { c.SetCornerPermutationFromIndex(i); int s0 = c.GetCornerPermutationIndex(); c.MirrorUD(); int ud = c.GetCornerPermutationIndex(); c.MirrorLR(); int ud_lr = c.GetCornerPermutationIndex(); c.MirrorUD(); int lr = c.GetCornerPermutationIndex(); c.MirrorLR(); if (s0 != c.GetCornerPermutationIndex() || i != s0) { Console.WriteLine("ERROR: symmetry action do not match original situation!"); } int g = numGroups++; if (cornerSymGroup[s0] >= 0 || cornerSymGroup[ud] >= 0 || cornerSymGroup[lr] >= 0 || cornerSymGroup[ud_lr] >= 0 ) { Console.WriteLine("ERROR: Overwriting symmetry group member"); } cornerSymGroup[s0] = g; cornerSymGroup[ud] = g; cornerSymGroup[lr] = g; cornerSymGroup[ud_lr] = g; symGroupMembers[g] = new int[] { s0, ud, lr, ud_lr }; // Console.Write(g + ": " + s0 + " " + ud + " " + lr + " " + ud_lr + " "); // Console.WriteLine(); } } }