Trait concrete_core::math::tensor::IntoTensor [−][src]
pub trait IntoTensor {
type Element;
type Container: AsRefSlice<Element = <Self as IntoTensor>::Element>;
fn into_tensor(self) -> Tensor<Self::Container>;
}
Expand description
This trait allows to extract the tensor of a Tensor
-based type.
This trait allows to consume a value, and extracts the tensor that was wrapped inside, to return it to the caller.
Associated Types
type Container: AsRefSlice<Element = <Self as IntoTensor>::Element>
type Container: AsRefSlice<Element = <Self as IntoTensor>::Element>
The type of the collection container.
Required methods
fn into_tensor(self) -> Tensor<Self::Container>
fn into_tensor(self) -> Tensor<Self::Container>
Consumes self
and returns an owned tensor.