Struct matrixable::strategies::RotateL
source · pub struct RotateL;
Expand description
Performs a counter-clockwise rotation.
§Example
use matrixable::MatrixExt;
use matrixable::strategies::{ TransformStrategy, RotateL };
let m = [
[ 0, 1 ],
[ 2, 3 ],
[ 4, 5 ]
];
// `m` is borrowed
let access = m.access(RotateL);
let expected = [
[ 1, 3, 5 ],
[ 0, 2, 4 ]
];
assert!(expected.iter().eq(access.iter()));
// `m` is consumed.
let t = RotateL.out_of(m);
assert_eq!(expected, t);
Trait Implementations§
source§impl<M: MatrixExt> AccessStrategy<M> for RotateL
impl<M: MatrixExt> AccessStrategy<M> for RotateL
source§fn access(&self, m: &M, i: usize, j: usize) -> Option<(usize, usize)>
fn access(&self, m: &M, i: usize, j: usize) -> Option<(usize, usize)>
Gives the location (if it exists) of the element in a matrix that
should match the indexes (subscripts) provided according to the access strategy. Read more
source§impl<M: SwapsDimensions> InPlace<M> for RotateL
impl<M: SwapsDimensions> InPlace<M> for RotateL
source§impl Ord for RotateL
impl Ord for RotateL
source§impl PartialEq for RotateL
impl PartialEq for RotateL
source§impl PartialOrd for RotateL
impl PartialOrd for RotateL
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<M: MatrixExt> TransformStrategy<M> for RotateLwhere
Transpose: TransformStrategy<M>,
<Transpose as TransformStrategy<M>>::Output: MatrixExt,
FlipV: TransformStrategy<<Transpose as TransformStrategy<M>>::Output>,
impl<M: MatrixExt> TransformStrategy<M> for RotateLwhere
Transpose: TransformStrategy<M>,
<Transpose as TransformStrategy<M>>::Output: MatrixExt,
FlipV: TransformStrategy<<Transpose as TransformStrategy<M>>::Output>,
impl Copy for RotateL
impl Eq for RotateL
impl StructuralPartialEq for RotateL
Auto Trait Implementations§
impl RefUnwindSafe for RotateL
impl Send for RotateL
impl Sync for RotateL
impl Unpin for RotateL
impl UnwindSafe for RotateL
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