pub trait ShapeBuilder {
    type Dim: Dimension;
    type Strides;

    // Required methods
    fn into_shape(self) -> Shape<Self::Dim>;
    fn f(self) -> Shape<Self::Dim>;
    fn set_f(self, is_f: bool) -> Shape<Self::Dim>;
    fn strides(self, strides: Self::Strides) -> StrideShape<Self::Dim>;
}
Expand description

A trait for Shape and D where D: Dimension that allows customizing the memory layout (strides) of an array shape.

This trait is used together with array constructor methods like Array::from_shape_vec.

Required Associated Types§

Required Methods§

source

fn into_shape(self) -> Shape<Self::Dim>

source

fn f(self) -> Shape<Self::Dim>

source

fn set_f(self, is_f: bool) -> Shape<Self::Dim>

source

fn strides(self, strides: Self::Strides) -> StrideShape<Self::Dim>

Implementors§

source§

impl<D> ShapeBuilder for Shape<D>
where D: Dimension,

§

type Dim = D

§

type Strides = D

source§

impl<T> ShapeBuilder for T
where T: IntoDimension,

§

type Dim = <T as IntoDimension>::Dim

§

type Strides = T