Thanks to visit codestin.com
Credit goes to docs.rs

ShapeBuilder

Trait ShapeBuilder 

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

    // Required methods
    fn into_shape_with_order(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§

Source

type Dim: Dimension

The type that captures the built shape’s dimensionality.

Source

type Strides

The type that captures the built shape’s stride pattern.

Required Methods§

Source

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

Turn into a contiguous-element Shape.

Source

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

Convert into a Fortran-order (a.k.a., column-order) Shape.

Source

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

Set the order of the shape to either Fortran or non-Fortran.

Source

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

Set the strides of the shape.

Implementors§

Source§

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

Source§

type Dim = D

Source§

type Strides = D

Source§

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