Trait ella_common::ops::TensorOp

source ·
pub trait TensorOp<Rhs: TensorValue>: TensorValue {
    type Output<Out>;

    // Required method
    fn apply<F, O>(self, other: Rhs, op: F) -> Self::Output<O>
       where F: Fn(Self::Unmasked, Rhs::Unmasked) -> O,
             O: TensorValue,
             Self::Output<O>: TensorValue;
}

Required Associated Types§

source

type Output<Out>

Required Methods§

source

fn apply<F, O>(self, other: Rhs, op: F) -> Self::Output<O>where F: Fn(Self::Unmasked, Rhs::Unmasked) -> O, O: TensorValue, Self::Output<O>: TensorValue,

Implementations on Foreign Types§

source§

impl<T> TensorOp<Option<T>> for Option<T>where T: TensorValue<Unmasked = T, Masked = Option<T>>, Option<T>: TensorValue<Unmasked = T>,

§

type Output<Out> = Option<Out>

source§

fn apply<F, O>(self, other: Option<T>, op: F) -> Self::Output<O>where F: Fn(Self::Unmasked, <Option<T> as TensorValue>::Unmasked) -> O, O: TensorValue, Self::Output<O>: TensorValue,

source§

impl<T> TensorOp<T> for Option<T>where T: TensorValue<Unmasked = T, Masked = Option<T>>, Option<T>: TensorValue<Unmasked = T>,

§

type Output<Out> = Option<Out>

source§

fn apply<F, O>(self, other: T, op: F) -> Self::Output<O>where F: Fn(Self::Unmasked, <T as TensorValue>::Unmasked) -> O, O: TensorValue, Self::Output<O>: TensorValue,

Implementors§

source§

impl<T> TensorOp<Option<T>> for Twhere T: TensorValue<Unmasked = T, Masked = Option<T>>, Option<T>: TensorValue<Unmasked = T>,

§

type Output<Out> = Option<Out>

source§

impl<T> TensorOp<T> for Twhere T: TensorValue<Unmasked = Self>,

§

type Output<Out> = Out