diff -r 331345346e7b -r 7fd0984743b5 src/mapping.rs --- a/src/mapping.rs Fri Apr 28 09:03:21 2023 +0300 +++ b/src/mapping.rs Fri Apr 28 13:42:03 2023 +0300 @@ -51,7 +51,7 @@ /// Trait for calculation the differential of `Self` as a mathematical function on `X`. -pub trait Differentiate { +pub trait Differentiable { type Output; /// Compute the differential of `self` at `x`. @@ -65,16 +65,16 @@ /// This is automatically implemented when the relevant [`Differentiate`] are implemented. pub trait DifferentiableMapping : Mapping - + Differentiate - + for<'a> Differentiate<&'a Domain, Output=Self::Differential>{ + + Differentiable + + for<'a> Differentiable<&'a Domain, Output=Self::Differential>{ type Differential; } impl DifferentiableMapping for T where T : Mapping - + Differentiate - + for<'a> Differentiate<&'a Domain, Output=Differential> { + + Differentiable + + for<'a> Differentiable<&'a Domain, Output=Differential> { type Differential = Differential; } @@ -103,7 +103,7 @@ } } -impl Differentiate for Sum +impl Differentiable for Sum where M : DifferentiableMapping, M :: Codomain : std::iter::Sum, M :: Differential : std::iter::Sum,