generic_array_storage

Trait GenericMatrixExt

Source
pub trait GenericMatrixExt {
    type T: Scalar;
    type R: Conv;
    type C: Conv;

    // Required methods
    fn into_regular_matrix(
        self,
    ) -> OMatrix<Self::T, <Self::R as Conv>::Nalg, <Self::C as Conv>::Nalg>
       where DefaultAllocator: Allocator<<Self::R as Conv>::Nalg, <Self::C as Conv>::Nalg>;
    fn conv<NewR: Conv<TNum = <Self::R as Conv>::TNum>, NewC: Conv<TNum = <Self::C as Conv>::TNum>>(
        self,
    ) -> GenericMatrix<Self::T, NewR, NewC>;
}
Expand description

Conv trait defining GenericMatrix conversions.

Required Associated Types§

Source

type T: Scalar

Type of the elements.

This an associated type for the simple reason that is can be such.

Source

type R: Conv

Type defining rows count

Source

type C: Conv

Type defining column count

Required Methods§

Source

fn into_regular_matrix( self, ) -> OMatrix<Self::T, <Self::R as Conv>::Nalg, <Self::C as Conv>::Nalg>
where DefaultAllocator: Allocator<<Self::R as Conv>::Nalg, <Self::C as Conv>::Nalg>,

Converts GenericMatrix into regular nalgebra matrix, backed by core array (it’s opaque about that though)

Source

fn conv<NewR: Conv<TNum = <Self::R as Conv>::TNum>, NewC: Conv<TNum = <Self::C as Conv>::TNum>>( self, ) -> GenericMatrix<Self::T, NewR, NewC>

Changes type of GenericMatrix to a different row and column count descriptors.

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<T: Scalar, R: Conv, C: Conv> GenericMatrixExt for GenericMatrix<T, R, C>

Source§

type T = T

Source§

type R = R

Source§

type C = C