Skip to main content

MatTyped

Trait MatTyped 

Source
pub trait MatTyped<T>: Sized
where T: TensorScalar,
{ // Required methods fn into_typed(self) -> TypedTensor<T, Rank<2>>; fn from_typed(t: &TypedTensor<T, Rank<2>>) -> Result<Self, Error>; }
Expand description

Conversions between Mat and tenferro rank-2 tensors

Required Methods§

Source

fn into_typed(self) -> TypedTensor<T, Rank<2>>

Move into a tenferro rank-2 tensor without copying.

Source

fn from_typed(t: &TypedTensor<T, Rank<2>>) -> Result<Self, Error>

Copy a host-resident tenferro matrix.

§Errors

Returns an error when the tensor is not host-resident compact column-major storage.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> MatTyped<T> for Mat<T>
where T: TensorScalar,