| 1 /*! |
1 /*! |
| 2 Regularisation terms |
2 Regularisation terms |
| 3 */ |
3 */ |
| 4 |
4 |
| 5 #[allow(unused_imports)] // Used by documentation. |
5 #[allow(unused_imports)] // Used by documentation. |
| 6 use crate::fb::pointsource_fb_reg; |
6 use crate::fb::pointsource_fb_dom; |
| 7 use crate::fb::InsertionConfig; |
7 use crate::fb::InsertionConfig; |
| 8 use crate::measures::{DeltaMeasure, DiscreteMeasure, Radon, RNDM}; |
8 use crate::measures::{DeltaMeasure, DiscreteMeasure, Radon, RNDM}; |
| 9 #[allow(unused_imports)] // Used by documentation. |
9 #[allow(unused_imports)] // Used by documentation. |
| 10 use crate::sliding_fb::pointsource_sliding_fb_dom; |
10 use crate::sliding_fb::pointsource_sliding_fb; |
| 11 use crate::types::*; |
11 use crate::types::*; |
| 12 use alg_tools::instance::{Instance, Space}; |
12 use alg_tools::instance::{Instance, Space}; |
| 13 use alg_tools::linops::Mapping; |
13 use alg_tools::linops::Mapping; |
| 14 use alg_tools::loc::Loc; |
14 use alg_tools::loc::Loc; |
| 15 use alg_tools::norms::Norm; |
15 use alg_tools::norms::Norm; |
| 25 use alg_tools::nalgebra_support::ToNalgebraRealField; |
25 use alg_tools::nalgebra_support::ToNalgebraRealField; |
| 26 use nalgebra::{DMatrix, DVector}; |
26 use nalgebra::{DMatrix, DVector}; |
| 27 |
27 |
| 28 use std::cmp::Ordering::{Equal, Greater, Less}; |
28 use std::cmp::Ordering::{Equal, Greater, Less}; |
| 29 |
29 |
| 30 /// The regularisation term $α\\|μ\\|\_{ℳ(Ω)} + δ_{≥ 0}(μ)$ for [`pointsource_fb_reg`] and other |
30 /// The regularisation term $α\\|μ\\|\_{ℳ(Ω)} + δ_{≥ 0}(μ)$ for [`pointsource_fb_dom`] and other |
| 31 /// algorithms. |
31 /// algorithms. |
| 32 /// |
32 /// |
| 33 /// The only member of the struct is the regularisation parameter α. |
33 /// The only member of the struct is the regularisation parameter α. |
| 34 #[derive(Copy, Clone, Debug, Serialize, Deserialize)] |
34 #[derive(Copy, Clone, Debug, Serialize, Deserialize)] |
| 35 pub struct NonnegRadonRegTerm<F: Float = f64>(pub F /* α */); |
35 pub struct NonnegRadonRegTerm<F: Float = f64>(pub F /* α */); |