Orbit64.Internal.Symmetry
The 48 symmetries of the cube as permutations of the facelet indices.
Internal to the package: Orbit64.Canonical is the public face of it.
A symmetry is a signed permutation of the three axes: 24 rotations and
their 24 mirror images. It sends every sticker to another sticker of the
same cube. The tables are derived from geometry alone: a facelet is
face * n * n + row * n + col over U R F D L B, the layout Orbit64.Net
reads and writes. locate places a facelet in space, indexOf is its
inverse, and a symmetry is applied to the position and the normal of a
sticker together.
Symmetry g has the axis permutation g / 8 and the sign bits g % 8.
Row r of its matrix has the single entry -1 if sign bit r is set and
1 otherwise, in column axes(g / 8)[r]. Symmetry 0 is the identity
and symmetry 1 mirrors across the R/L plane.
Definitions
The facelet at the middle of face face of an odd cube; None for an
even cube, which has no such facelet, or a face outside 0 to 5.
The three stickers of each corner, U R F first and then the other
seven corners; within a corner the sticker on the U or D face comes
first, then the one on R or L, then the one on F or B.
The number of symmetries: the 6 axis permutations times the 8 sign choices.
Where the stickers go under symmetry g: sticker i of the cube moves
to index Vector.get(i, destinations(n, g)).
stickers moved by symmetry g; the colors stay. An error unless
stickers has 6 * n * n entries and g is a symmetry.
The least relabeled image of stickers over all 48 symmetries.
Images compare as sticker strings: the first sticker decides, then the
second, in face order U R F D L B. Two cubes have the same least
image exactly when one is the other turned, mirrored and recolored.
The symmetry that mirrors across the plane between the R and L faces.