ReshapableStorage in nalgebra::base::storage - Rust
Description: A matrix storage that can be reshaped in-place.
Keywords: rust, rustlang, rust-lang, ReshapableStorage

# Trait nalgebra::base::storage::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>;

        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.

## 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,

§

#### 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,

§

#### 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,

§

#### type Output = VecStorage<T, Dyn, C2>

source§

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

§

#### type Output = VecStorage<T, R2, Dyn>

source§

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

§

#### type Output = VecStorage<T, Dyn, C2>

source§

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

§

#### type Output = VecStorage<T, R2, Dyn>

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>>,

§

#### type Output = ArrayStorage<T, R2, C2>