src/forward_model.rs

branch
dev
changeset 49
6b0db7251ebe
parent 44
03251c546744
--- a/src/forward_model.rs	Fri Feb 14 23:16:14 2025 -0500
+++ b/src/forward_model.rs	Fri Feb 14 23:46:43 2025 -0500
@@ -2,56 +2,56 @@
 Forward models from discrete measures to observations.
 */
 
-pub use alg_tools::linops::*;
+use alg_tools::error::DynError;
 use alg_tools::euclidean::Euclidean;
-use alg_tools::error::DynError;
 use alg_tools::instance::Instance;
-use alg_tools::norms::{NormExponent, L2, Norm};
+pub use alg_tools::linops::*;
+use alg_tools::norms::{Norm, NormExponent, L2};
 
+use crate::measures::Radon;
 use crate::types::*;
-use crate::measures::Radon;
+pub mod bias;
 pub mod sensor_grid;
-pub mod bias;
 
 /// `ForwardeModel`s are bounded preadjointable linear operators  $A ∈ 𝕃(𝒵(Ω); E)$
 /// where $𝒵(Ω) ⊂ ℳ(Ω)$ is the space of sums of delta measures, presented by
 /// [`crate::measures::DiscreteMeasure`], and $E$ is a [`Euclidean`] space.
-pub trait ForwardModel<Domain : Space, F : Float = f64, E : NormExponent = Radon>
-    : BoundedLinear<Domain, E, L2, F, Codomain=Self::Observable>
+pub trait ForwardModel<Domain: Space, F: Float = f64, E: NormExponent = Radon>:
+    BoundedLinear<Domain, E, L2, F, Codomain = Self::Observable>
     + GEMV<F, Domain, Self::Observable>
     + Preadjointable<Domain, Self::Observable>
 where
-    for<'a> Self::Observable : Instance<Self::Observable>,
-    Domain : Norm<F, E>,
+    for<'a> Self::Observable: Instance<Self::Observable>,
+    Domain: Norm<F, E>,
 {
     /// The codomain or value space (of “observables”) for this operator.
     /// It is assumed to be a [`Euclidean`] space, and therefore also (identified with)
     /// the domain of the preadjoint.
-    type Observable : Euclidean<F, Output=Self::Observable>
-                      + AXPY<F>
-                      + Space
-                      + Clone;
+    type Observable: Euclidean<F, Output = Self::Observable> + AXPY<F> + Space + Clone;
 
     /// Write an observable into a file.
-    fn write_observable(&self, b : &Self::Observable, prefix : String) -> DynError;
+    fn write_observable(&self, b: &Self::Observable, prefix: String) -> DynError;
 
     /// Returns a zero observable
     fn zero_observable(&self) -> Self::Observable;
 }
 
 /// Trait for operators $A$ for which $A_*A$ is bounded by some other operator.
-pub trait AdjointProductBoundedBy<Domain : Space, D> : Linear<Domain> {
-    type FloatType : Float;
+pub trait AdjointProductBoundedBy<Domain: Space, D>: Linear<Domain> {
+    type FloatType: Float;
     /// Return $L$ such that $A_*A ≤ LD$.
-    fn adjoint_product_bound(&self, other : &D) -> Option<Self::FloatType>;
+    fn adjoint_product_bound(&self, other: &D) -> Option<Self::FloatType>;
 }
 
 /// Trait for operators $A$ for which $A_*A$ is bounded by a diagonal operator.
-pub trait AdjointProductPairBoundedBy<Domain : Space, D1, D2> : Linear<Domain> {
-    type FloatType : Float;
+pub trait AdjointProductPairBoundedBy<Domain: Space, D1, D2>: Linear<Domain> {
+    type FloatType: Float;
     /// Return $(L, L_z)$ such that $A_*A ≤ (L_1 D_1, L_2 D_2)$.
-    fn adjoint_product_pair_bound(&self, other1 : &D1, other_2 : &D2)
-        -> Option<(Self::FloatType, Self::FloatType)>;
+    fn adjoint_product_pair_bound(
+        &self,
+        other1: &D1,
+        other_2: &D2,
+    ) -> Option<(Self::FloatType, Self::FloatType)>;
 }
 
 /*
@@ -72,14 +72,12 @@
 }
 */
 
-/// Trait for [`ForwardModel`]s that satisfy bounds on the curvature $𝒦_F$.
+/// Trait for [`ForwardModel`]s that satisfy bounds on curvature.
 pub trait BoundedCurvature {
-    type FloatType : Float;
+    type FloatType: Float;
 
-    /// Returns components for a bound $ℓ_F$ on the curvature
-    /// $$
-    ///     𝒦_F(μ, γ) = ∫ B_{F'(μ)} dγ +  B_F(μ, μ+Δ).
-    /// $$
-    /// such that $𝒦_F(μ, γ)  ≤ ℓ_F ∫  c_2 d|γ|$.
+    /// Returns factor $ℓ_F$ and $ℓ_r$ such that
+    /// $B_{F'(μ)} dγ ≤ ℓ_F c_2$ and $⟨F'(μ)+F'(μ+Δ)|Δ⟩ ≤ ℓ_r|γ|(c_2)$,
+    /// where $Δ=(π_♯^1-π_♯^0)γ$.
     fn curvature_bound_components(&self) -> (Option<Self::FloatType>, Option<Self::FloatType>);
 }

mercurial