pub trait MatTyped<T>: Sizedwhere
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§
Sourcefn into_typed(self) -> TypedTensor<T, Rank<2>>
fn into_typed(self) -> TypedTensor<T, Rank<2>>
Move into a tenferro rank-2 tensor without copying.
Sourcefn from_typed(t: &TypedTensor<T, Rank<2>>) -> Result<Self, Error>
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".