--- a/src/forward_model.rs Fri May 15 14:40:02 2026 -0500 +++ b/src/forward_model.rs Sun Jul 19 07:34:39 2026 +0200 @@ -43,40 +43,20 @@ BetterThanZero, } -/// Curvature error control: helper bounds for (4.2d), (5.2a), (5.2b), (5.15a), and (5.16a). -/// -/// Based on Lemma 5.11 and Example 5.12, the helper bound for (5.15a) and (5.16a) is (3.8). -/// Thus, subject to `guess` being correct, returns factor $(ℓ_F, Θ²)$ such that -/// $B_{F'(μ)} dγ ≤ ℓ_F c_2$ and $⟨F'(μ+Δ)-F'(μ)|Δ⟩ ≤ Θ²|γ|(c_2)$, where $Δ=(π_♯^1-π_♯^0)γ$. -/// The latter is the firm transport Lipshitz property of (3.8b) and Lemma 5.11. -/// -/// This trait is supposed to be implemented by the data term $F$, in the basic case a -/// [`Mapping`] from [`RNDM<N, F>`] to a [`Float`] `F`. -/// The generic implementation for operators that satisfy [`BasicCurvatureBoundEstimates`] -/// uses Remark 5.15 and Example 5.16 for (4.2d) and (5.2a), and (5.2b); -/// and Lemma 3.8 for (3.8). +/// Curvature error control. pub trait BoundedCurvature<F: Float = f64> { - /// Returns $(ℓ_F, Θ²)$ or individual errors for each. + /// Returns an estimate of $(ℓ_F, ℓ_∇v, Θ²)$ or individual errors for each. fn curvature_bound_components( &self, guess: BoundedCurvatureGuess, - ) -> (DynResult<F>, DynResult<F>); + ) -> (DynResult<F>, DynResult<F>, DynResult<F>); } -/// Curvature error control: helper bounds for (4.2d), (5.2a), (5.2b), (5.15a), and (5.16a) -/// for quadratic dataterms $F(μ) = \frac{1}{2}\|Aμ-b\|^2$. -/// -/// This trait is to be implemented by the [`Linear`] operator $A$, in the basic from -/// [`RNDM<N, F>`] to a an Euclidean space. -/// It is used by implementations of [`BoundedCurvature`] for $F$. -/// -/// Based on Lemma 5.11 and Example 5.12, the helper bound for (5.15a) and (5.16a) is (3.8). -/// This trait provides the factor $θ²$ of (3.8) as determined by Lemma 3.8. -/// To aid in calculating (4.2d), (5.2a), (5.2b), motivated by Example 5.16, it also provides -/// $ℓ_F^0$ such that $∇v^k$ $ℓ_F^0 \|Aμ-b\|$-Lipschitz. Here $v^k := F'(∪^k)$. +/// Curvature error control: helper Lipschitz-like bounds for the quadratic dataterms +/// $F(μ) = \frac{1}{2}\|Aμ-b\|^2$. pub trait BasicCurvatureBoundEstimates<F: Float = f64> { - /// Returns $(ℓ_F^0, Θ²)$ or individual errors for each. - fn basic_curvature_bound_components(&self) -> (DynResult<F>, DynResult<F>); + /// Returns $(ℓ_F, ℓ_{∇v}^0, Θ²)$ or individual errors for each. + fn basic_curvature_bound_components(&self) -> (DynResult<F>, DynResult<F>, DynResult<F>); } impl<F, A, Z, const N: usize> BoundedCurvature<F> for QuadraticDataTerm<F, RNDM<N, F>, A> @@ -89,13 +69,13 @@ fn curvature_bound_components( &self, guess: BoundedCurvatureGuess, - ) -> (DynResult<F>, DynResult<F>) { + ) -> (DynResult<F>, DynResult<F>, DynResult<F>) { match guess { BoundedCurvatureGuess::BetterThanZero => { let opA = self.operator(); let b = self.data(); - let (ℓ_F0, θ2) = opA.basic_curvature_bound_components(); - (ℓ_F0.map(|l| l * b.norm2()), θ2) + let (ℓ_F, ℓ_gradv_0, θ2) = opA.basic_curvature_bound_components(); + (ℓ_F, ℓ_gradv_0.map(|l| l * b.norm2()), θ2) } } }