Skip to main content

ConvertMatOps

Trait ConvertMatOps 

Source
pub trait ConvertMatOps {
    type Mat;
    type Scalar;

    // Required methods
    fn from_tensor(_: &Tensor) -> Result<Self::Mat>;
    fn to_tensor(&self, dev: &Device) -> Result<Tensor>;
}
Expand description

Reading off from Tensor

Required Associated Types§

Required Methods§

Source

fn from_tensor(_: &Tensor) -> Result<Self::Mat>

Source

fn to_tensor(&self, dev: &Device) -> Result<Tensor>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T> ConvertMatOps for CscMatrix<T>
where T: RealField + Copy + WithDType,

Available on crate feature tensor only.
Source§

impl<T> ConvertMatOps for DMatrix<T>
where T: RealField + Copy + WithDType,

Available on crate feature tensor only.