concision_core/traits/gradient.rs
1/*
2 appellation: gradient <module>
3 authors: @FL03
4*/
5
6/// the [`Gradient`] trait defines the gradient of a function, which is a function that
7/// takes an input and returns a delta, which is the change in the output with respect to
8/// the input.
9pub trait Gradient<T, D> {
10 type Repr<_A>;
11 type Delta<_S, _D>;
12
13 fn grad(&self, rhs: &Self::Delta<Self::Repr<T>, D>) -> Self::Delta<Self::Repr<T>, D>;
14}