nyx_space::linalg

Trait ReshapableStorage

Source
pub trait ReshapableStorage<T, R1, C1, R2, C2>: RawStorage<T, R1, C1>
where T: Scalar, R1: Dim, C1: Dim, R2: Dim, C2: Dim,
{ type Output: RawStorage<T, R2, C2>; // Required method fn reshape_generic(self, nrows: R2, ncols: C2) -> Self::Output; }
Expand description

A matrix storage that can be reshaped in-place.

Required Associated Types§

Source

type Output: RawStorage<T, R2, C2>

The reshaped storage type.

Required Methods§

Source

fn reshape_generic(self, nrows: R2, ncols: C2) -> Self::Output

Reshapes the storage into the output storage type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T, R1, C1, R2, C2> ReshapableStorage<T, R1, C1, R2, C2> for ViewStorage<'a, T, R1, C1, Const<1>, R1>
where T: Scalar, R1: Dim, C1: Dim, R2: Dim, C2: Dim,

Source§

type Output = ViewStorage<'a, T, R2, C2, Const<1>, R2>

Source§

impl<'a, T, R1, C1, R2, C2> ReshapableStorage<T, R1, C1, R2, C2> for ViewStorageMut<'a, T, R1, C1, Const<1>, R1>
where T: Scalar, R1: Dim, C1: Dim, R2: Dim, C2: Dim,

Source§

type Output = ViewStorageMut<'a, T, R2, C2, Const<1>, R2>

Source§

impl<T, C1, C2> ReshapableStorage<T, Dyn, C1, Dyn, C2> for VecStorage<T, Dyn, C1>
where T: Scalar, C1: Dim, C2: Dim,

Source§

impl<T, C1, R2> ReshapableStorage<T, Dyn, C1, R2, Dyn> for VecStorage<T, Dyn, C1>
where T: Scalar, C1: Dim, R2: DimName,

Source§

impl<T, R1, C2> ReshapableStorage<T, R1, Dyn, Dyn, C2> for VecStorage<T, R1, Dyn>
where T: Scalar, R1: DimName, C2: Dim,

Source§

impl<T, R1, R2> ReshapableStorage<T, R1, Dyn, R2, Dyn> for VecStorage<T, R1, Dyn>
where T: Scalar, R1: DimName, R2: DimName,

Source§

impl<T, const R1: usize, const C1: usize, const R2: usize, const C2: usize> ReshapableStorage<T, Const<R1>, Const<C1>, Const<R2>, Const<C2>> for ArrayStorage<T, R1, C1>
where T: Scalar, Const<R1>: ToTypenum, Const<C1>: ToTypenum, Const<R2>: ToTypenum, Const<C2>: ToTypenum, <Const<R1> as ToTypenum>::Typenum: Mul<<Const<C1> as ToTypenum>::Typenum>, <Const<R2> as ToTypenum>::Typenum: Mul<<Const<C2> as ToTypenum>::Typenum, Output = <<Const<R1> as ToTypenum>::Typenum as Mul<<Const<C1> as ToTypenum>::Typenum>>::Output>,

Source§

type Output = ArrayStorage<T, R2, C2>