nalgebra::base::storage

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, U1, 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, U1, 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, 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 = Prod<<Const<R1> as ToTypenum>::Typenum, <Const<C1> as ToTypenum>::Typenum>>,

Source§

type Output = ArrayStorage<T, R2, C2>