Trait gad::const_arith::ConstArithAlgebra[][src]

pub trait ConstArithAlgebra<Value, Const> {
    fn setc(&mut self, v: &Value, c: Const) -> Value;
fn addc(&mut self, v: &Value, c: Const) -> Value;
fn mulc(&mut self, v: &Value, c: Const) -> Value;
fn powc(&mut self, v: &Value, c: Const) -> Value; }

Element-wise arithmetic operations with a constant value.

Required methods

fn setc(&mut self, v: &Value, c: Const) -> Value[src]

Return a value with the same shape as v but filled with constant c.

fn addc(&mut self, v: &Value, c: Const) -> Value[src]

Element-wise addition of a constant v + c.

fn mulc(&mut self, v: &Value, c: Const) -> Value[src]

Element-wise multiplication by a constant v * c.

fn powc(&mut self, v: &Value, c: Const) -> Value[src]

Element-wise exponentiation by a constant v ^ c.

Loading content...

Implementors

impl<C> ConstArithAlgebra<(), C> for Check[src]

impl<D, E, Dims, C> ConstArithAlgebra<Value<D>, C> for Graph<Config1<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + ArithAlgebra<D> + ConstArithAlgebra<D, C> + LinkedAlgebra<Value<D>, D>,
    C: Sub<C, Output = C> + One + Clone + 'static + Send + Sync,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<D, E, Dims, C> ConstArithAlgebra<Value<D>, C> for Graph<ConfigN<E>> where
    E: Default + Clone + CoreAlgebra<D, Value = D> + ArithAlgebra<D> + ConstArithAlgebra<D, C> + LinkedAlgebra<Value<D>, D>,
    C: Sub<C, Output = C> + One + Clone + 'static + Send + Sync,
    D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
    Dims: PartialEq + Debug + Clone + 'static + Send + Sync
[src]

impl<T, C> ConstArithAlgebra<T, C> for Eval where
    T: Number + From<C> + Pow<C, Output = T>, 
[src]

Loading content...