Enum lax::layout::MatrixLayout
source · [−]Variants
C
F
Implementations
sourceimpl MatrixLayout
impl MatrixLayout
pub fn size(&self) -> (i32, i32)
pub fn resized(&self, row: i32, col: i32) -> MatrixLayout
pub fn lda(&self) -> i32
pub fn len(&self) -> i32
pub fn is_empty(&self) -> bool
pub fn same_order(&self, other: &MatrixLayout) -> bool
pub fn toggle_order(&self) -> Self
sourcepub fn t(&self) -> Self
pub fn t(&self) -> Self
Transpose without changing memory representation
C-contigious row=2, lda=3
[[1, 2, 3]
[4, 5, 6]]
and F-contigious col=2, lda=3
[[1, 4]
[2, 5]
[3, 6]]
have same memory representation [1, 2, 3, 4, 5, 6]
, and this toggles them.
let layout = MatrixLayout::C { row: 2, lda: 3 };
assert_eq!(layout.t(), MatrixLayout::F { col: 2, lda: 3 });
Trait Implementations
sourceimpl Clone for MatrixLayout
impl Clone for MatrixLayout
sourcefn clone(&self) -> MatrixLayout
fn clone(&self) -> MatrixLayout
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MatrixLayout
impl Debug for MatrixLayout
sourceimpl PartialEq<MatrixLayout> for MatrixLayout
impl PartialEq<MatrixLayout> for MatrixLayout
sourcefn eq(&self, other: &MatrixLayout) -> bool
fn eq(&self, other: &MatrixLayout) -> bool
impl Copy for MatrixLayout
impl Eq for MatrixLayout
impl StructuralEq for MatrixLayout
impl StructuralPartialEq for MatrixLayout
Auto Trait Implementations
impl RefUnwindSafe for MatrixLayout
impl Send for MatrixLayout
impl Sync for MatrixLayout
impl Unpin for MatrixLayout
impl UnwindSafe for MatrixLayout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more