pub struct Commutator(pub MoveSequence, pub MoveSequence);Expand description
A struct representing a commutator, taking the form of a tuple.
If the first element of this tuple is $A$, and the second is $B$, then the commutator represented by this is $[A,B] = ABA^{-1}B^{-1}$.
One can create a Commutator object as such:
use rusty_rubik::cube::*;
use rusty_rubik::cube_move;
fn main() {
let a = MoveSequence(vec![
cube_move!(R, Normal),
cube_move!(U, Prime),
cube_move!(R, Prime),
]);
let b = MoveSequence(vec![cube_move!(D, Normal)]);
// commutator representing [R U' R', D] = R U' R' D R U R' D'
let comm = Commutator(a,b);
}Tuple Fields§
§0: MoveSequence§1: MoveSequenceAuto Trait Implementations§
impl Freeze for Commutator
impl RefUnwindSafe for Commutator
impl Send for Commutator
impl Sync for Commutator
impl Unpin for Commutator
impl UnwindSafe for Commutator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more