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
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
.
Provided methods
fn add_all(&mut self, values: &[&Self::Value]) -> Result<Self::Value> where
Self::Value: Clone,
[src]
Self::Value: Clone,
Compute the sum of several values.
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]
E: Default + Clone + CoreAlgebra<D, Value = D>,
D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
Dims: PartialEq + Debug + Clone + 'static + Send + Sync,
type Value = Value<D>
fn variable(&mut self, data: D) -> Value<D>
[src]
fn constant(&mut self, data: D) -> Value<D>
[src]
fn add(&mut self, v1: &Value<D>, v2: &Value<D>) -> Result<Value<D>>
[src]
fn add_all(&mut self, values: &[&Value<D>]) -> Result<Value<D>>
[src]
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]
E: Default + Clone + CoreAlgebra<D, Value = D>,
D: HasDims<Dims = Dims> + Clone + 'static + Send + Sync,
Dims: PartialEq + Debug + Clone + 'static + Send + Sync,
type Value = Value<D>
fn variable(&mut self, data: D) -> Value<D>
[src]
fn constant(&mut self, data: D) -> Value<D>
[src]
fn add(&mut self, v1: &Value<D>, v2: &Value<D>) -> Result<Value<D>>
[src]
fn add_all(&mut self, values: &[&Value<D>]) -> Result<Value<D>>
[src]
impl<T> CoreAlgebra<Array<T>> for Eval where
T: HasAfEnum + ImplicitPromote<T, Output = T>,
[src]
T: HasAfEnum + ImplicitPromote<T, Output = T>,