Trait tract_core::internal::tract_ndarray::ShapeBuilder[][src]

pub trait ShapeBuilder {
    type Dim: Dimension;
    type Strides;
    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.

Associated Types

Required methods

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

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

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

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

Implementors

impl<D> ShapeBuilder for Shape<D> where
    D: Dimension
[src]

type Dim = D

type Strides = D

pub fn into_shape(self) -> Shape<D>[src]

pub fn f(self) -> Shape<D>[src]

pub fn set_f(self, is_f: bool) -> Shape<D>[src]

pub fn strides(self, st: D) -> StrideShape<D>[src]

impl<T> ShapeBuilder for T where
    T: IntoDimension
[src]

type Dim = <T as IntoDimension>::Dim

type Strides = T

pub fn into_shape(self) -> Shape<<T as ShapeBuilder>::Dim>[src]

pub fn f(self) -> Shape<<T as ShapeBuilder>::Dim>[src]

pub fn set_f(self, is_f: bool) -> Shape<<T as ShapeBuilder>::Dim>[src]

pub fn strides(self, st: T) -> StrideShape<<T as ShapeBuilder>::Dim>[src]