Description Usage Arguments Details Value See Also Examples
Invert, mirror and rotate move sequences, and calculate the order of a move sequence.
1 2 3 4 5 6 | invMoves(moves, revseq = TRUE, collapse = NULL)
mirMoves(moves, mirror = c("0","UD","DU","RL","LR","FB","BF"), collapse = NULL)
rotMoves(moves, rotation = c("0","x","x1","x3'","y","y1","y3'","z","z1","z3'",
"x2","x2'","y2","y2'","z2","z2'","x'","x3","x1'","y'","y3","y1'","z'","z3",
"z1'"), invrot = FALSE, collapse = NULL)
moveOrder(moves)
|
moves |
A move sequence. Either a character sting, which may include
white space, or a character vector where each element is a single move.
For |
revseq |
If |
mirror |
The mirror to be used. The U/D mirror can be specified using the UD or DU character string. Similarly for R/L and F/B. |
rotation |
The rotation to be used. |
invrot |
Inverts the direction of the rotation. |
collapse |
If not |
For moveOrder
an integer value is returned giving the order of the move
sequence, which is the number of times it needs to be applied for the solved cube
to return to its solved state. The largest order for any sequence is known to be
1260; for example, the order of "R U2 D' B D'"
is 1260.
For other functions, a move sequence is returned. The returned move sequence will always use the canonical form for the turn notation: U not U1, U' not U1', and Uw not u for wide turns. However any form may be used for the input.
The Examples section below demonstrates the relationship between rotated move
sequences. If the rotation is r and the rotated move sequence is m
, then the
move sequence rm
r' is equivalent to the original. If invrot
is
TRUE
, then this becomes r'm
r.
A character vector of moves, or a character string if collapse
is
not NULL
.
move
, invCube
,
rotate
, scramble
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.