diff -r bd924d62d952 -r a0db98c16ab5 src/mapping.rs --- a/src/mapping.rs Wed Nov 06 15:34:17 2024 -0500 +++ b/src/mapping.rs Sat Nov 09 20:36:23 2024 -0500 @@ -68,10 +68,10 @@ /// Trait for calculation the differential of `Self` as a mathematical function on `X`. pub trait Differentiable : Sized { - type Output; + type Derivative; /// Compute the differential of `self` at `x`. - fn differential(&self, x : X) -> Self::Output; + fn differential(&self, x : X) -> Self::Derivative; } /// A differentiable mapping from `Domain` to [`Mapping::Codomain`], with differentials @@ -80,8 +80,8 @@ /// This is automatically implemented when the relevant [`Differentiate`] are implemented. pub trait DifferentiableMapping : Mapping - + Differentiable - + for<'a> Differentiable<&'a Domain, Output=Self::Differential> { + + Differentiable + + for<'a> Differentiable<&'a Domain, Derivative=Self::Differential> { type Differential; /// Form the differential mapping of `self`. @@ -98,8 +98,8 @@ impl DifferentiableMapping for T where T : Mapping - + Differentiable - + for<'a> Differentiable<&'a Domain, Output=Differential> { + + Differentiable + + for<'a> Differentiable<&'a Domain, Derivative=Differential> { type Differential = Differential; } @@ -149,9 +149,9 @@ M :: Differential : std::iter::Sum, Domain : Copy { - type Output = M::Differential; + type Derivative = M::Differential; - fn differential(&self, x : Domain) -> Self::Output { + fn differential(&self, x : Domain) -> Self::Derivative { self.components.iter().map(|c| c.differential(x)).sum() } } @@ -273,9 +273,9 @@ } impl<'g, X, G : Differentiable> Differentiable for Ref<'g, G> { - type Output = G::Output; + type Derivative = G::Derivative; #[inline] - fn differential(&self, x : X) -> Self::Output { + fn differential(&self, x : X) -> Self::Derivative { self.0.differential(x) } }