pub struct GeoCube { /* private fields */ }Expand description
A Rubik’s Cube with each of its facelets represented as a Sticker.
Each move is implemented as a rotation matrix and hence a move is applied by multiplying each of the relevant vectors with the matrix.
This implementation of a Rubik’s Cube is very programmatic but suffers from poor performance due to the expensive nature of matrix multiplication. This implementation should not be used directly, instead it should only be used to bootstrap more efficient implementations like the FaceletCube.
Implementations§
Trait Implementations§
Source§impl Cube for GeoCube
impl Cube for GeoCube
Source§fn apply_move(&self, mv: Move) -> Self
fn apply_move(&self, mv: Move) -> Self
Apply a move to a cube. Read more
Source§fn state(&self) -> Vec<Face>
fn state(&self) -> Vec<Face>
A one-dimensional representation of a cube as a sequence of the faces. Read more
impl Eq for GeoCube
impl StructuralPartialEq for GeoCube
Auto Trait Implementations§
impl Freeze for GeoCube
impl RefUnwindSafe for GeoCube
impl Send for GeoCube
impl Sync for GeoCube
impl Unpin for GeoCube
impl UnwindSafe for GeoCube
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