Trait tc_collection::tensor::TensorConvert
source · pub trait TensorConvert: ThreadSafe {
type Dense: TensorInstance;
type Sparse: TensorInstance;
// Required methods
fn into_dense(self) -> Self::Dense;
fn into_sparse(self) -> Self::Sparse;
}
Expand description
Methods to convert between a sparse an dense Tensor
Required Associated Types§
sourcetype Dense: TensorInstance
type Dense: TensorInstance
A dense representation of this Tensor
sourcetype Sparse: TensorInstance
type Sparse: TensorInstance
A sparse representation of this Tensor
Required Methods§
sourcefn into_dense(self) -> Self::Dense
fn into_dense(self) -> Self::Dense
Return a dense representation of this Tensor
.
sourcefn into_sparse(self) -> Self::Sparse
fn into_sparse(self) -> Self::Sparse
Return a sparse representation of this Tensor
.