Enum ndarray_linalg::layout::MatrixLayout[][src]

pub enum MatrixLayout {
    C {
        row: i32,
        lda: i32,
    },
    F {
        col: i32,
        lda: i32,
    },
}

Variants

C

Fields of C

row: i32lda: i32
F

Fields of F

col: i32lda: i32

Implementations

impl MatrixLayout[src]

pub fn size(&self) -> (i32, i32)[src]

pub fn resized(&self, row: i32, col: i32) -> MatrixLayout[src]

pub fn lda(&self) -> i32[src]

pub fn len(&self) -> i32[src]

pub fn is_empty(&self) -> bool[src]

pub fn same_order(&self, other: &MatrixLayout) -> bool[src]

pub fn toggle_order(&self) -> MatrixLayout[src]

pub fn t(&self) -> MatrixLayout[src]

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

impl Clone for MatrixLayout[src]

impl Copy for MatrixLayout[src]

impl Debug for MatrixLayout[src]

impl Eq for MatrixLayout[src]

impl PartialEq<MatrixLayout> for MatrixLayout[src]

impl StructuralEq for MatrixLayout[src]

impl StructuralPartialEq for MatrixLayout[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,