Skip to main content

Erase

Trait Erase 

Source
pub trait Erase {
    type Erased: Tensor;

    // Required method
    fn erase(&self) -> &Self::Erased;
}
Expand description

Views a tensor with its configurations and unit discarded.

Contracting tensors of different units gives a quantity whose unit is the product, which is not always one this library names. Generic code that only wants the number contracts the erased views instead.

Required Associated Types§

Source

type Erased: Tensor

The tensor with its configurations and unit discarded.

Required Methods§

Source

fn erase(&self) -> &Self::Erased

Views the tensor with its configurations and unit discarded.

Implementors§

Source§

impl Erase for Vector

Source§

impl Erase for TensorRank0

Source§

impl<T1, T2> Erase for TensorTuple<T1, T2>
where T1: Erase + Tensor, T2: Erase + Tensor, <T1 as Erase>::Erased: Tensor, <T2 as Erase>::Erased: Tensor,

Source§

type Erased = TensorTuple<<T1 as Erase>::Erased, <T2 as Erase>::Erased>

Source§

impl<T> Erase for TensorVector<T>
where T: Erase + Tensor,

Source§

impl<T, const N: usize> Erase for TensorList<T, N>
where T: Erase + Tensor, <T as Erase>::Erased: Tensor,

Source§

impl<U> Erase for Quantity<U>

Source§

impl<const D: usize, I, J, K, L, U> Erase for TensorRank4<D, I, J, K, L, U>

Source§

impl<const D: usize, I, J, U> Erase for TensorRank2<D, I, J, U>

Source§

impl<const D: usize, I, U> Erase for TensorRank1<D, I, U>