diff -r dccf609cd020 -r a5ee4bfb0b87 src/mapping/dataterm.rs --- a/src/mapping/dataterm.rs Mon Dec 08 15:23:42 2025 -0500 +++ b/src/mapping/dataterm.rs Thu Jan 15 16:12:47 2026 -0500 @@ -112,12 +112,11 @@ F: Float, X: Space, Y: Space + Instance + for<'a> Sub<&'a Y, Output = Y>, - //>::Codomain: Euclidean, A: Linear + Preadjointable, G::DerivativeDomain: Instance, A::PreadjointCodomain: ClosedSpace, - //<>::Codomain as Euclidean>::Output: Instance<>::Codomain>, G: DifferentiableMapping, + Self: Mapping, { type Derivative = A::PreadjointCodomain; @@ -129,7 +128,13 @@ //self.opA.preadjoint().apply(self.opA.apply(x) - self.b) self.opA .preadjoint() - .apply(self.g.diff_ref().apply(self.opA.apply(x) - &self.b)) + .apply(self.g.differential(self.opA.apply(x) - &self.b)) + } + + fn apply_and_differential_impl>(&self, x: I) -> (F, Self::Derivative) { + let j = self.opA.apply(x) - &self.b; + let (v, d) = self.g.apply_and_differential(j); + (v, self.opA.preadjoint().apply(d)) } }