Mon, 17 Feb 2025 14:10:45 -0500
Add macros to katex-header.
0 | 1 | /*! |
2 | Forward models from discrete measures to observations. | |
3 | */ | |
4 | ||
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
5 | use alg_tools::error::DynError; |
0 | 6 | use alg_tools::euclidean::Euclidean; |
35 | 7 | use alg_tools::instance::Instance; |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
8 | pub use alg_tools::linops::*; |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
9 | use alg_tools::norms::{Norm, NormExponent, L2}; |
0 | 10 | |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
11 | use crate::measures::Radon; |
0 | 12 | use crate::types::*; |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
13 | pub mod bias; |
35 | 14 | pub mod sensor_grid; |
0 | 15 | |
16 | /// `ForwardeModel`s are bounded preadjointable linear operators $A ∈ 𝕃(𝒵(Ω); E)$ | |
17 | /// where $𝒵(Ω) ⊂ ℳ(Ω)$ is the space of sums of delta measures, presented by | |
35 | 18 | /// [`crate::measures::DiscreteMeasure`], and $E$ is a [`Euclidean`] space. |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
19 | pub trait ForwardModel<Domain: Space, F: Float = f64, E: NormExponent = Radon>: |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
20 | BoundedLinear<Domain, E, L2, F, Codomain = Self::Observable> |
35 | 21 | + GEMV<F, Domain, Self::Observable> |
22 | + Preadjointable<Domain, Self::Observable> | |
23 | where | |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
24 | for<'a> Self::Observable: Instance<Self::Observable>, |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
25 | Domain: Norm<F, E>, |
35 | 26 | { |
0 | 27 | /// The codomain or value space (of “observables”) for this operator. |
28 | /// It is assumed to be a [`Euclidean`] space, and therefore also (identified with) | |
29 | /// the domain of the preadjoint. | |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
30 | type Observable: Euclidean<F, Output = Self::Observable> + AXPY<F> + Space + Clone; |
0 | 31 | |
32 | /// Write an observable into a file. | |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
33 | fn write_observable(&self, b: &Self::Observable, prefix: String) -> DynError; |
0 | 34 | |
35 | /// Returns a zero observable | |
36 | fn zero_observable(&self) -> Self::Observable; | |
37 | } | |
38 | ||
35 | 39 | /// Trait for operators $A$ for which $A_*A$ is bounded by some other operator. |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
40 | pub trait AdjointProductBoundedBy<Domain: Space, D>: Linear<Domain> { |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
41 | type FloatType: Float; |
35 | 42 | /// Return $L$ such that $A_*A ≤ LD$. |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
43 | fn adjoint_product_bound(&self, other: &D) -> Option<Self::FloatType>; |
0 | 44 | } |
45 | ||
35 | 46 | /// Trait for operators $A$ for which $A_*A$ is bounded by a diagonal operator. |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
47 | pub trait AdjointProductPairBoundedBy<Domain: Space, D1, D2>: Linear<Domain> { |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
48 | type FloatType: Float; |
35 | 49 | /// Return $(L, L_z)$ such that $A_*A ≤ (L_1 D_1, L_2 D_2)$. |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
50 | fn adjoint_product_pair_bound( |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
51 | &self, |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
52 | other1: &D1, |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
53 | other_2: &D2, |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
54 | ) -> Option<(Self::FloatType, Self::FloatType)>; |
0 | 55 | } |
56 | ||
44 | 57 | /* |
35 | 58 | /// Trait for [`ForwardModel`]s whose preadjoint has Lipschitz values. |
59 | pub trait LipschitzValues { | |
60 | type FloatType : Float; | |
61 | /// Return (if one exists) a factor $L$ such that $A_*z$ is $L$-Lipschitz for all | |
62 | /// $z$ in the unit ball. | |
63 | fn value_unit_lipschitz_factor(&self) -> Option<Self::FloatType> { | |
64 | None | |
0 | 65 | } |
66 | ||
35 | 67 | /// Return (if one exists) a factor $L$ such that $∇A_*z$ is $L$-Lipschitz for all |
68 | /// $z$ in the unit ball. | |
69 | fn value_diff_unit_lipschitz_factor(&self) -> Option<Self::FloatType> { | |
70 | None | |
0 | 71 | } |
72 | } | |
44 | 73 | */ |
0 | 74 | |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
75 | /// Trait for [`ForwardModel`]s that satisfy bounds on curvature. |
44 | 76 | pub trait BoundedCurvature { |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
77 | type FloatType: Float; |
44 | 78 | |
49
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
79 | /// Returns factor $ℓ_F$ and $ℓ_r$ such that |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
80 | /// $B_{F'(μ)} dγ ≤ ℓ_F c_2$ and $⟨F'(μ)+F'(μ+Δ)|Δ⟩ ≤ ℓ_r|γ|(c_2)$, |
6b0db7251ebe
Some documentation and factor changes related to ℓ_F and ℓ_r.
Tuomo Valkonen <tuomov@iki.fi>
parents:
44
diff
changeset
|
81 | /// where $Δ=(π_♯^1-π_♯^0)γ$. |
44 | 82 | fn curvature_bound_components(&self) -> (Option<Self::FloatType>, Option<Self::FloatType>); |
83 | } |