aboutsummaryrefslogtreecommitdiff
path: root/src/speedcubing/coordinates
diff options
context:
space:
mode:
Diffstat (limited to 'src/speedcubing/coordinates')
-rw-r--r--src/speedcubing/coordinates/coordinates.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/speedcubing/coordinates/coordinates.md b/src/speedcubing/coordinates/coordinates.md
index 5640bca..afae46f 100644
--- a/src/speedcubing/coordinates/coordinates.md
+++ b/src/speedcubing/coordinates/coordinates.md
@@ -36,7 +36,7 @@ To work with cube coordinates, we need to implement the following:
36 valid cube object. 36 valid cube object.
37* A function `move()` that takes as input a coordinate, a move m and an 37* A function `move()` that takes as input a coordinate, a move m and an
38 integer x in [0..n-1] and returns an integer y in [0..n-1] such 38 integer x in [0..n-1] and returns an integer y in [0..n-1] such
39 that `y == index(m(to_cube(x)))` (here m(c) is the cube c moved by m). 39 that `y == index(m(to_cube(x)))` (here `m(c)` is the cube c moved by m).
40* If applicable, a `transform()` function that applies a transformation 40* If applicable, a `transform()` function that applies a transformation
41 in a similar way as `move()` applies a move. For coordinates this is 41 in a similar way as `move()` applies a move. For coordinates this is
42 not possible, because they do not capture enough of the cube state. 42 not possible, because they do not capture enough of the cube state.
@@ -65,15 +65,15 @@ by the integer `n` and the functions `index()` and `to_cube()` defined
65above. This is the type of coordinate that "does not exist" in the code, 65above. This is the type of coordinate that "does not exist" in the code,
66because they are just a special case of *composite coordinates*. 66because they are just a special case of *composite coordinates*.
67 67
68### Composite coordinates (COMP_COORD) 68### Composite coordinates (COMP\_COORD)
69 69
70Composite coordinates are, like the name says, a composition of many basic 70Composite coordinates are, like the name says, a composition of many basic
71coordinates. They are given by a list of basic coordinates (n_1, index_1(), 71coordinates. They are given by a list of basic coordinates (n\_1, index\_1(),
72to_cube_1()), ..., (n_k, index_k(), to_cube_k()). The value of such a 72to\_cube\_1()), ..., (n\_k, index\_k(), to\_cube\_k()). The value of such a
73composite coordinate on cube c is computed as 73composite coordinate on cube c is computed as
74index_1(c) + n_1 * (index_2(c) + n_2 * (...)). 74`index_1(c) + n_1 * (index_2(c) + n_2 * (...))`.
75 75
76### Symmetric coordinates (SYM_COORD) 76### Symmetric coordinates (SYM\_COORD)
77 77
78A symmetric coordinate consists of a basic coordinate reduced by symmetry. 78A symmetric coordinate consists of a basic coordinate reduced by symmetry.
79Symmetric coordinates must be initialized from a given set of *cube 79Symmetric coordinates must be initialized from a given set of *cube
@@ -93,7 +93,7 @@ the following data:
93 a list of *self-symmetries*. This will be useful when computing the 93 a list of *self-symmetries*. This will be useful when computing the
94 pruning table associated to this coordinate. 94 pruning table associated to this coordinate.
95 95
96### Symmetric-composite coordinates (SYMCOMP_COORD) 96### Symmetric-composite coordinates (SYMCOMP\_COORD)
97 97
98A symmetric-composite coordinate is based on two other coordinates, a 98A symmetric-composite coordinate is based on two other coordinates, a
99symmetric coordinate and a composite coordinate. To compute the value 99symmetric coordinate and a composite coordinate. To compute the value
@@ -106,13 +106,13 @@ composite coordinate, and finally combine the two.
106More precisely and with less tong-twisting, for a given cube c one must 106More precisely and with less tong-twisting, for a given cube c one must
107take the following steps: 107take the following steps:
108 108
109* Compute the value x_s of the symmetric coordinate at c, the value 109* Compute the value x\_s of the symmetric coordinate at c, the value
110 x_b of the *basic* coordinate associated with the symmetric coordinate 110 x\_b of the *basic* coordinate associated with the symmetric coordinate
111 and the value x_c of the composite coordinate. 111 and the value x\_c of the composite coordinate.
112* Read from the table the transformation t that brings x_b to its 112* Read from the table the transformation t that brings x\_b to its
113 representative. 113 representative.
114* Apply t to the composite coordinate value x_c to obtain x_t. 114* Apply t to the composite coordinate value x\_c to obtain x\_t.
115* Compute the value x_s * n_c + x_t, where n_c is the maximum value +1 115* Compute the value x\_s * n\_c + x\_t, where n\_c is the maximum value +1
116 of the composite coordinate. 116 of the composite coordinate.
117 117
118## Moving coordinates 118## Moving coordinates

Generated with cgit - Back to sebastiano.tronto.net