diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-03-29 12:37:10 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-03-29 12:37:10 +0100 |
| commit | 57056f658bbba0ea1b3dd9fece8dc00c17e2dade (patch) | |
| tree | 997591c66f4c00425215f70a039c1b8188c0fc82 /src/speedcubing/coordinates | |
| parent | 7952d72cf1ef28d4d48740b8a8bc948d68fbc62a (diff) | |
| download | sebastiano.tronto.net-57056f658bbba0ea1b3dd9fece8dc00c17e2dade.tar.gz sebastiano.tronto.net-57056f658bbba0ea1b3dd9fece8dc00c17e2dade.zip | |
Some fixes to the coordinate page
Diffstat (limited to '')
| -rw-r--r-- | src/speedcubing/coordinates/coordinates.md | 26 |
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 | |||
| 65 | above. This is the type of coordinate that "does not exist" in the code, | 65 | above. This is the type of coordinate that "does not exist" in the code, |
| 66 | because they are just a special case of *composite coordinates*. | 66 | because they are just a special case of *composite coordinates*. |
| 67 | 67 | ||
| 68 | ### Composite coordinates (COMP_COORD) | 68 | ### Composite coordinates (COMP\_COORD) |
| 69 | 69 | ||
| 70 | Composite coordinates are, like the name says, a composition of many basic | 70 | Composite coordinates are, like the name says, a composition of many basic |
| 71 | coordinates. They are given by a list of basic coordinates (n_1, index_1(), | 71 | coordinates. They are given by a list of basic coordinates (n\_1, index\_1(), |
| 72 | to_cube_1()), ..., (n_k, index_k(), to_cube_k()). The value of such a | 72 | to\_cube\_1()), ..., (n\_k, index\_k(), to\_cube\_k()). The value of such a |
| 73 | composite coordinate on cube c is computed as | 73 | composite coordinate on cube c is computed as |
| 74 | index_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 | ||
| 78 | A symmetric coordinate consists of a basic coordinate reduced by symmetry. | 78 | A symmetric coordinate consists of a basic coordinate reduced by symmetry. |
| 79 | Symmetric coordinates must be initialized from a given set of *cube | 79 | Symmetric 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 | ||
| 98 | A symmetric-composite coordinate is based on two other coordinates, a | 98 | A symmetric-composite coordinate is based on two other coordinates, a |
| 99 | symmetric coordinate and a composite coordinate. To compute the value | 99 | symmetric coordinate and a composite coordinate. To compute the value |
| @@ -106,13 +106,13 @@ composite coordinate, and finally combine the two. | |||
| 106 | More precisely and with less tong-twisting, for a given cube c one must | 106 | More precisely and with less tong-twisting, for a given cube c one must |
| 107 | take the following steps: | 107 | take 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 |
