Trait gad::core::CoreAlgebra[][src]

pub trait CoreAlgebra<Data> {
    type Value;
    fn variable(&mut self, data: Data) -> Self::Value;
fn constant(&mut self, data: Data) -> Self::Value;
fn add(&mut self, v1: &Self::Value, v2: &Self::Value) -> Result<Self::Value>; fn add_all(&mut self, values: &[&Self::Value]) -> Result<Self::Value>
    where
        Self::Value: Clone
, { ... } }

Core trait for data operations that support differentiation of values.

Associated Types

type Value[src]

Tracked values of underlying type Data.

Loading content...

Required methods

fn variable(&mut self, data: Data) -> Self::Value[src]

A differential input to the computation.

fn constant(&mut self, data: Data) -> Self::Value[src]

A non-differential input to the computation.

fn add(&mut self, v1: &Self::Value, v2: &Self::Value) -> Result<Self::Value>[src]

Compute the sum of two values v1 + v2.

Loading content...

Provided methods

fn add_all(&mut self, values: &[&Self::Value]) -> Result<Self::Value> where
    Self::Value: Clone
[src]

Compute the sum of several values.

Loading content...

Implementors

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

type Value = Value<D>

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

type Value = Value<D>

impl<T: Number> CoreAlgebra<T> for Check[src]

type Value = ()

impl<T: Number> CoreAlgebra<T> for Eval[src]

type Value = T

Loading content...