Wed, 22 Mar 2023 20:37:49 +0200
Bump version
0 | 1 | /*! |
2 | Solver for the point source localisation problem with primal-dual proximal splitting. | |
3 | ||
4 | This corresponds to the manuscript | |
5 | ||
13
bdc57366d4f5
arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents:
0
diff
changeset
|
6 | * Valkonen T. - _Proximal methods for point source localisation_, |
bdc57366d4f5
arXiv links, README beautification
Tuomo Valkonen <tuomov@iki.fi>
parents:
0
diff
changeset
|
7 | [arXiv:2212.02991](https://arxiv.org/abs/2212.02991). |
0 | 8 | |
9 | The main routine is [`pointsource_pdps`]. It is based on specilisatinn of | |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
10 | [`generic_pointsource_fb_reg`] through relevant [`FBSpecialisation`] implementations. |
0 | 11 | Both norm-2-squared and norm-1 data terms are supported. That is, implemented are solvers for |
12 | <div> | |
13 | $$ | |
14 | \min_{μ ∈ ℳ(Ω)}~ F_0(Aμ - b) + α \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ), | |
15 | $$ | |
16 | for both $F_0(y)=\frac{1}{2}\|y\|_2^2$ and $F_0(y)=\|y\|_1$ with the forward operator | |
17 | $A \in 𝕃(ℳ(Ω); ℝ^n)$. | |
18 | </div> | |
19 | ||
20 | ## Approach | |
21 | ||
22 | <p> | |
23 | The problem above can be written as | |
24 | $$ | |
25 | \min_μ \max_y G(μ) + ⟨y, Aμ-b⟩ - F_0^*(μ), | |
26 | $$ | |
27 | where $G(μ) = α \|μ\|_{ℳ(Ω)} + δ_{≥ 0}(μ)$. | |
28 | The Fenchel–Rockafellar optimality conditions, employing the predual in $ℳ(Ω)$, are | |
29 | $$ | |
30 | 0 ∈ A_*y + ∂G(μ) | |
31 | \quad\text{and}\quad | |
32 | Aμ - b ∈ ∂ F_0^*(y). | |
33 | $$ | |
34 | The solution of the first part is as for forward-backward, treated in the manuscript. | |
35 | This is the task of <code>generic_pointsource_fb</code>, where we use <code>FBSpecialisation</code> | |
36 | to replace the specific residual $Aμ-b$ by $y$. | |
37 | For $F_0(y)=\frac{1}{2}\|y\|_2^2$ the second part reads $y = Aμ -b$. | |
38 | For $F_0(y)=\|y\|_1$ the second part reads $y ∈ ∂\|·\|_1(Aμ - b)$. | |
39 | </p> | |
40 | ||
41 | Based on zero initialisation for $μ$, we use the [`Subdifferentiable`] trait to make an | |
42 | initialisation corresponding to the second part of the optimality conditions. | |
43 | In the algorithm itself, standard proximal steps are taking with respect to $F\_0^* + ⟨b, ·⟩$. | |
44 | */ | |
45 | ||
46 | use numeric_literals::replace_float_literals; | |
47 | use serde::{Serialize, Deserialize}; | |
48 | use nalgebra::DVector; | |
49 | use clap::ValueEnum; | |
50 | ||
51 | use alg_tools::iterate:: AlgIteratorFactory; | |
52 | use alg_tools::sets::Cube; | |
53 | use alg_tools::loc::Loc; | |
54 | use alg_tools::euclidean::Euclidean; | |
55 | use alg_tools::norms::{ | |
56 | L1, Linfinity, | |
57 | Projection, Norm, | |
58 | }; | |
59 | use alg_tools::bisection_tree::{ | |
60 | BTFN, | |
61 | PreBTFN, | |
62 | Bounds, | |
63 | BTNodeLookup, | |
64 | BTNode, | |
65 | BTSearch, | |
66 | P2Minimise, | |
67 | SupportGenerator, | |
68 | LocalAnalysis, | |
69 | }; | |
70 | use alg_tools::mapping::RealMapping; | |
71 | use alg_tools::nalgebra_support::ToNalgebraRealField; | |
72 | use alg_tools::linops::AXPY; | |
73 | ||
74 | use crate::types::*; | |
75 | use crate::measures::DiscreteMeasure; | |
76 | use crate::measures::merging::{ | |
77 | SpikeMerging, | |
78 | }; | |
79 | use crate::forward_model::ForwardModel; | |
80 | use crate::seminorms::{ | |
81 | DiscreteMeasureOp, Lipschitz | |
82 | }; | |
83 | use crate::plot::{ | |
84 | SeqPlotter, | |
85 | Plotting, | |
86 | PlotLookup | |
87 | }; | |
88 | use crate::fb::{ | |
89 | FBGenericConfig, | |
90 | FBSpecialisation, | |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
91 | generic_pointsource_fb_reg, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
92 | RegTerm, |
0 | 93 | }; |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
94 | use crate::regularisation::NonnegRadonRegTerm; |
0 | 95 | |
96 | /// Acceleration | |
97 | #[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, ValueEnum, Debug)] | |
98 | pub enum Acceleration { | |
99 | /// No acceleration | |
100 | #[clap(name = "none")] | |
101 | None, | |
102 | /// Partial acceleration, $ω = 1/\sqrt{1+σ}$ | |
103 | #[clap(name = "partial", help = "Partial acceleration, ω = 1/√(1+σ)")] | |
104 | Partial, | |
105 | /// Full acceleration, $ω = 1/\sqrt{1+2σ}$; no gap convergence guaranteed | |
106 | #[clap(name = "full", help = "Full acceleration, ω = 1/√(1+2σ); no gap convergence guaranteed")] | |
107 | Full | |
108 | } | |
109 | ||
110 | /// Settings for [`pointsource_pdps`]. | |
111 | #[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Debug)] | |
112 | #[serde(default)] | |
113 | pub struct PDPSConfig<F : Float> { | |
114 | /// Primal step length scaling. We must have `τ0 * σ0 < 1`. | |
115 | pub τ0 : F, | |
116 | /// Dual step length scaling. We must have `τ0 * σ0 < 1`. | |
117 | pub σ0 : F, | |
118 | /// Accelerate if available | |
119 | pub acceleration : Acceleration, | |
120 | /// Generic parameters | |
121 | pub insertion : FBGenericConfig<F>, | |
122 | } | |
123 | ||
124 | #[replace_float_literals(F::cast_from(literal))] | |
125 | impl<F : Float> Default for PDPSConfig<F> { | |
126 | fn default() -> Self { | |
127 | let τ0 = 0.5; | |
128 | PDPSConfig { | |
129 | τ0, | |
130 | σ0 : 0.99/τ0, | |
131 | acceleration : Acceleration::Partial, | |
132 | insertion : Default::default() | |
133 | } | |
134 | } | |
135 | } | |
136 | ||
137 | /// Trait for subdifferentiable objects | |
138 | pub trait Subdifferentiable<F : Float, V, U=V> { | |
139 | /// Calculate some subdifferential at `x` | |
140 | fn some_subdifferential(&self, x : V) -> U; | |
141 | } | |
142 | ||
143 | /// Type for indicating norm-2-squared data fidelity. | |
144 | pub struct L2Squared; | |
145 | ||
146 | impl<F : Float, V : Euclidean<F>> Subdifferentiable<F, V> for L2Squared { | |
147 | fn some_subdifferential(&self, x : V) -> V { x } | |
148 | } | |
149 | ||
150 | impl<F : Float + nalgebra::RealField> Subdifferentiable<F, DVector<F>> for L1 { | |
151 | fn some_subdifferential(&self, mut x : DVector<F>) -> DVector<F> { | |
152 | // nalgebra sucks for providing second copies of the same stuff that's elsewhere as well. | |
153 | x.iter_mut() | |
154 | .for_each(|v| if *v != F::ZERO { *v = *v/<F as NumTraitsFloat>::abs(*v) }); | |
155 | x | |
156 | } | |
157 | } | |
158 | ||
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
159 | /// Specialisation of [`generic_pointsource_fb_reg`] to PDPS. |
0 | 160 | pub struct PDPS< |
161 | 'a, | |
162 | F : Float + ToNalgebraRealField, | |
163 | A : ForwardModel<Loc<F, N>, F>, | |
164 | D, | |
165 | const N : usize | |
166 | > { | |
167 | /// The data | |
168 | b : &'a A::Observable, | |
169 | /// The forward operator | |
170 | opA : &'a A, | |
171 | /// Primal step length | |
172 | τ : F, | |
173 | // Dual step length | |
174 | σ : F, | |
175 | /// Whether acceleration should be applied (if data term supports) | |
176 | acceleration : Acceleration, | |
177 | /// The dataterm. Only used by the type system. | |
178 | _dataterm : D, | |
179 | /// Previous dual iterate. | |
180 | y_prev : A::Observable, | |
181 | } | |
182 | ||
183 | /// Implementation of [`FBSpecialisation`] for μPDPS with norm-2-squared data fidelity. | |
184 | #[replace_float_literals(F::cast_from(literal))] | |
185 | impl< | |
186 | 'a, | |
187 | F : Float + ToNalgebraRealField, | |
188 | A : ForwardModel<Loc<F, N>, F>, | |
189 | const N : usize | |
190 | > FBSpecialisation<F, A::Observable, N> for PDPS<'a, F, A, L2Squared, N> | |
191 | where for<'b> &'b A::Observable : std::ops::Add<A::Observable, Output=A::Observable> { | |
192 | ||
193 | fn update( | |
194 | &mut self, | |
195 | μ : &mut DiscreteMeasure<Loc<F, N>, F>, | |
196 | μ_base : &DiscreteMeasure<Loc<F, N>, F> | |
197 | ) -> (A::Observable, Option<F>) { | |
198 | let σ = self.σ; | |
199 | let τ = self.τ; | |
200 | let ω = match self.acceleration { | |
201 | Acceleration::None => 1.0, | |
202 | Acceleration::Partial => { | |
203 | let ω = 1.0 / (1.0 + σ).sqrt(); | |
204 | self.σ = σ * ω; | |
205 | self.τ = τ / ω; | |
206 | ω | |
207 | }, | |
208 | Acceleration::Full => { | |
209 | let ω = 1.0 / (1.0 + 2.0 * σ).sqrt(); | |
210 | self.σ = σ * ω; | |
211 | self.τ = τ / ω; | |
212 | ω | |
213 | }, | |
214 | }; | |
215 | ||
216 | μ.prune(); | |
217 | ||
218 | let mut y = self.b.clone(); | |
219 | self.opA.gemv(&mut y, 1.0 + ω, μ, -1.0); | |
220 | self.opA.gemv(&mut y, -ω, μ_base, 1.0); | |
221 | y.axpy(1.0 / (1.0 + σ), &self.y_prev, σ / (1.0 + σ)); | |
222 | self.y_prev.copy_from(&y); | |
223 | ||
224 | (y, Some(self.τ)) | |
225 | } | |
226 | ||
227 | fn calculate_fit( | |
228 | &self, | |
229 | μ : &DiscreteMeasure<Loc<F, N>, F>, | |
230 | _y : &A::Observable | |
231 | ) -> F { | |
232 | self.calculate_fit_simple(μ) | |
233 | } | |
234 | ||
235 | fn calculate_fit_simple( | |
236 | &self, | |
237 | μ : &DiscreteMeasure<Loc<F, N>, F>, | |
238 | ) -> F { | |
239 | let mut residual = self.b.clone(); | |
240 | self.opA.gemv(&mut residual, 1.0, μ, -1.0); | |
241 | residual.norm2_squared_div2() | |
242 | } | |
243 | } | |
244 | ||
245 | /// Implementation of [`FBSpecialisation`] for μPDPS with norm-1 data fidelity. | |
246 | #[replace_float_literals(F::cast_from(literal))] | |
247 | impl< | |
248 | 'a, | |
249 | F : Float + ToNalgebraRealField, | |
250 | A : ForwardModel<Loc<F, N>, F>, | |
251 | const N : usize | |
252 | > FBSpecialisation<F, A::Observable, N> for PDPS<'a, F, A, L1, N> | |
253 | where A::Observable : Projection<F, Linfinity> + Norm<F, L1>, | |
254 | for<'b> &'b A::Observable : std::ops::Add<A::Observable, Output=A::Observable> { | |
255 | fn update( | |
256 | &mut self, | |
257 | μ : &mut DiscreteMeasure<Loc<F, N>, F>, | |
258 | μ_base : &DiscreteMeasure<Loc<F, N>, F> | |
259 | ) -> (A::Observable, Option<F>) { | |
260 | let σ = self.σ; | |
261 | ||
262 | μ.prune(); | |
263 | ||
264 | //let ȳ = self.opA.apply(μ) * 2.0 - self.opA.apply(μ_base); | |
265 | //*y = proj_{[-1,1]}(&self.y_prev + (ȳ - self.b) * σ) | |
266 | let mut y = self.y_prev.clone(); | |
267 | self.opA.gemv(&mut y, 2.0 * σ, μ, 1.0); | |
268 | self.opA.gemv(&mut y, -σ, μ_base, 1.0); | |
269 | y.axpy(-σ, self.b, 1.0); | |
270 | y.proj_ball_mut(1.0, Linfinity); | |
271 | self.y_prev.copy_from(&y); | |
272 | ||
273 | (y, None) | |
274 | } | |
275 | ||
276 | fn calculate_fit( | |
277 | &self, | |
278 | μ : &DiscreteMeasure<Loc<F, N>, F>, | |
279 | _y : &A::Observable | |
280 | ) -> F { | |
281 | self.calculate_fit_simple(μ) | |
282 | } | |
283 | ||
284 | fn calculate_fit_simple( | |
285 | &self, | |
286 | μ : &DiscreteMeasure<Loc<F, N>, F>, | |
287 | ) -> F { | |
288 | let mut residual = self.b.clone(); | |
289 | self.opA.gemv(&mut residual, 1.0, μ, -1.0); | |
290 | residual.norm(L1) | |
291 | } | |
292 | } | |
293 | ||
294 | /// Iteratively solve the pointsource localisation problem using primal-dual proximal splitting. | |
295 | /// | |
296 | /// The `dataterm` should be either [`L1`] for norm-1 data term or [`L2Squared`] for norm-2-squared. | |
297 | /// The settings in `config` have their [respective documentation](PDPSConfig). `opA` is the | |
298 | /// forward operator $A$, $b$ the observable, and $\lambda$ the regularisation weight. | |
299 | /// The operator `op𝒟` is used for forming the proximal term. Typically it is a convolution | |
300 | /// operator. Finally, the `iterator` is an outer loop verbosity and iteration count control | |
301 | /// as documented in [`alg_tools::iterate`]. | |
302 | /// | |
303 | /// For the mathematical formulation, see the [module level](self) documentation and the manuscript. | |
304 | /// | |
305 | /// Returns the final iterate. | |
306 | #[replace_float_literals(F::cast_from(literal))] | |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
307 | pub fn pointsource_pdps_reg<'a, F, I, A, GA, 𝒟, BTA, G𝒟, S, K, D, Reg, const N : usize>( |
0 | 308 | opA : &'a A, |
309 | b : &'a A::Observable, | |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
310 | reg : Reg, |
0 | 311 | op𝒟 : &'a 𝒟, |
312 | config : &PDPSConfig<F>, | |
313 | iterator : I, | |
314 | plotter : SeqPlotter<F, N>, | |
315 | dataterm : D, | |
316 | ) -> DiscreteMeasure<Loc<F, N>, F> | |
317 | where F : Float + ToNalgebraRealField, | |
318 | I : AlgIteratorFactory<IterInfo<F, N>>, | |
319 | for<'b> &'b A::Observable : std::ops::Neg<Output=A::Observable> | |
320 | + std::ops::Add<A::Observable, Output=A::Observable>, | |
321 | //+ std::ops::Mul<F, Output=A::Observable>, // <-- FIXME: compiler overflow | |
322 | A::Observable : std::ops::MulAssign<F>, | |
323 | GA : SupportGenerator<F, N, SupportType = S, Id = usize> + Clone, | |
324 | A : ForwardModel<Loc<F, N>, F, PreadjointCodomain = BTFN<F, GA, BTA, N>> | |
325 | + Lipschitz<𝒟, FloatType=F>, | |
326 | BTA : BTSearch<F, N, Data=usize, Agg=Bounds<F>>, | |
327 | G𝒟 : SupportGenerator<F, N, SupportType = K, Id = usize> + Clone, | |
328 | 𝒟 : DiscreteMeasureOp<Loc<F, N>, F, PreCodomain = PreBTFN<F, G𝒟, N>>, | |
329 | 𝒟::Codomain : RealMapping<F, N>, | |
330 | S: RealMapping<F, N> + LocalAnalysis<F, Bounds<F>, N>, | |
331 | K: RealMapping<F, N> + LocalAnalysis<F, Bounds<F>, N>, | |
332 | BTNodeLookup: BTNode<F, usize, Bounds<F>, N>, | |
333 | PlotLookup : Plotting<N>, | |
334 | DiscreteMeasure<Loc<F, N>, F> : SpikeMerging<F>, | |
335 | PDPS<'a, F, A, D, N> : FBSpecialisation<F, A::Observable, N>, | |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
336 | D : Subdifferentiable<F, A::Observable>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
337 | Reg : RegTerm<F, N> { |
0 | 338 | |
339 | let y = dataterm.some_subdifferential(-b); | |
340 | let l = opA.lipschitz_factor(&op𝒟).unwrap().sqrt(); | |
341 | let τ = config.τ0 / l; | |
342 | let σ = config.σ0 / l; | |
343 | ||
344 | let pdps = PDPS { | |
345 | b, | |
346 | opA, | |
347 | τ, | |
348 | σ, | |
349 | acceleration : config.acceleration, | |
350 | _dataterm : dataterm, | |
351 | y_prev : y.clone(), | |
352 | }; | |
353 | ||
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
354 | generic_pointsource_fb_reg( |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
355 | opA, reg, op𝒟, τ, &config.insertion, iterator, plotter, y, pdps |
0 | 356 | ) |
24
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
357 | } |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
358 | |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
359 | // |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
360 | // Deprecated interfaces |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
361 | // |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
362 | |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
363 | #[deprecated(note = "Use `pointsource_pdps_reg`")] |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
364 | pub fn pointsource_pdps<'a, F, I, A, GA, 𝒟, BTA, G𝒟, S, K, D, const N : usize>( |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
365 | opA : &'a A, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
366 | b : &'a A::Observable, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
367 | α : F, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
368 | op𝒟 : &'a 𝒟, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
369 | config : &PDPSConfig<F>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
370 | iterator : I, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
371 | plotter : SeqPlotter<F, N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
372 | dataterm : D, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
373 | ) -> DiscreteMeasure<Loc<F, N>, F> |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
374 | where F : Float + ToNalgebraRealField, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
375 | I : AlgIteratorFactory<IterInfo<F, N>>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
376 | for<'b> &'b A::Observable : std::ops::Neg<Output=A::Observable> |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
377 | + std::ops::Add<A::Observable, Output=A::Observable>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
378 | A::Observable : std::ops::MulAssign<F>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
379 | GA : SupportGenerator<F, N, SupportType = S, Id = usize> + Clone, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
380 | A : ForwardModel<Loc<F, N>, F, PreadjointCodomain = BTFN<F, GA, BTA, N>> |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
381 | + Lipschitz<𝒟, FloatType=F>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
382 | BTA : BTSearch<F, N, Data=usize, Agg=Bounds<F>>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
383 | G𝒟 : SupportGenerator<F, N, SupportType = K, Id = usize> + Clone, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
384 | 𝒟 : DiscreteMeasureOp<Loc<F, N>, F, PreCodomain = PreBTFN<F, G𝒟, N>>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
385 | 𝒟::Codomain : RealMapping<F, N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
386 | S: RealMapping<F, N> + LocalAnalysis<F, Bounds<F>, N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
387 | K: RealMapping<F, N> + LocalAnalysis<F, Bounds<F>, N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
388 | BTNodeLookup: BTNode<F, usize, Bounds<F>, N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
389 | Cube<F, N>: P2Minimise<Loc<F, N>, F>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
390 | PlotLookup : Plotting<N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
391 | DiscreteMeasure<Loc<F, N>, F> : SpikeMerging<F>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
392 | PDPS<'a, F, A, D, N> : FBSpecialisation<F, A::Observable, N>, |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
393 | D : Subdifferentiable<F, A::Observable> { |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
394 | |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
395 | pointsource_pdps_reg(opA, b, NonnegRadonRegTerm(α), op𝒟, config, iterator, plotter, dataterm) |
d29d1fcf5423
Support arbitrary regularisation terms; implement non-positivity-constrained regularisation.
Tuomo Valkonen <tuomov@iki.fi>
parents:
13
diff
changeset
|
396 | } |