# HG changeset patch # User Tuomo Valkonen # Date 1682659251 -10800 # Node ID 87649ccfa6a815c936274c961144707cece76887 # Parent eb98b05b9c603d2bfa06481b86e4b7b0a8697654 Remove deprecated interfaces diff -r eb98b05b9c60 -r 87649ccfa6a8 Cargo.lock --- a/Cargo.lock Fri Apr 28 08:19:05 2023 +0300 +++ b/Cargo.lock Fri Apr 28 08:20:51 2023 +0300 @@ -917,7 +917,7 @@ [[package]] name = "pointsource_algs" -version = "1.0.1" +version = "2.0.0-dev" dependencies = [ "GSL", "alg_tools", diff -r eb98b05b9c60 -r 87649ccfa6a8 src/fb.rs --- a/src/fb.rs Fri Apr 28 08:19:05 2023 +0300 +++ b/src/fb.rs Fri Apr 28 08:20:51 2023 +0300 @@ -1010,73 +1010,3 @@ ), } } - -// -// Deprecated interfaces -// - -#[deprecated(note = "Use `pointsource_fb_reg`")] -pub fn pointsource_fb<'a, F, I, A, GA, 𝒟, BTA, G𝒟, S, K, const N : usize>( - opA : &'a A, - b : &A::Observable, - α : F, - op𝒟 : &'a 𝒟, - config : &FBConfig, - iterator : I, - plotter : SeqPlotter -) -> DiscreteMeasure, F> -where F : Float + ToNalgebraRealField, - I : AlgIteratorFactory>, - for<'b> &'b A::Observable : std::ops::Neg, - A::Observable : std::ops::MulAssign, - GA : SupportGenerator + Clone, - A : ForwardModel, F, PreadjointCodomain = BTFN> - + Lipschitz<𝒟, FloatType=F>, - BTA : BTSearch>, - G𝒟 : SupportGenerator + Clone, - 𝒟 : DiscreteMeasureOp, F, PreCodomain = PreBTFN>, - 𝒟::Codomain : RealMapping, - S: RealMapping + LocalAnalysis, N>, - K: RealMapping + LocalAnalysis, N>, - BTNodeLookup: BTNode, N>, - Cube: P2Minimise, F>, - PlotLookup : Plotting, - DiscreteMeasure, F> : SpikeMerging { - - pointsource_fb_reg(opA, b, NonnegRadonRegTerm(α), op𝒟, config, iterator, plotter) -} - - -#[deprecated(note = "Use `generic_pointsource_fb_reg`")] -pub fn generic_pointsource_fb<'a, F, I, A, GA, 𝒟, BTA, G𝒟, S, K, Spec, const N : usize>( - opA : &'a A, - α : F, - op𝒟 : &'a 𝒟, - τ : F, - config : &FBGenericConfig, - iterator : I, - plotter : SeqPlotter, - residual : A::Observable, - specialisation : Spec, -) -> DiscreteMeasure, F> -where F : Float + ToNalgebraRealField, - I : AlgIteratorFactory>, - Spec : FBSpecialisation, - A::Observable : std::ops::MulAssign, - GA : SupportGenerator + Clone, - A : ForwardModel, F, PreadjointCodomain = BTFN> - + Lipschitz<𝒟, FloatType=F>, - BTA : BTSearch>, - G𝒟 : SupportGenerator + Clone, - 𝒟 : DiscreteMeasureOp, F, PreCodomain = PreBTFN>, - 𝒟::Codomain : RealMapping, - S: RealMapping + LocalAnalysis, N>, - K: RealMapping + LocalAnalysis, N>, - BTNodeLookup: BTNode, N>, - Cube: P2Minimise, F>, - PlotLookup : Plotting, - DiscreteMeasure, F> : SpikeMerging { - - generic_pointsource_fb_reg(opA, NonnegRadonRegTerm(α), op𝒟, τ, config, iterator, plotter, - residual, specialisation) -} diff -r eb98b05b9c60 -r 87649ccfa6a8 src/frank_wolfe.rs --- a/src/frank_wolfe.rs Fri Apr 28 08:19:05 2023 +0300 +++ b/src/frank_wolfe.rs Fri Apr 28 08:20:51 2023 +0300 @@ -524,51 +524,3 @@ // Return final iterate μ } - -// -// Deprecated interface -// - -#[deprecated(note = "Use `pointsource_fw_reg`")] -pub fn pointsource_fw<'a, F, I, A, GA, BTA, S, const N : usize>( - opA : &'a A, - b : &A::Observable, - α : F, - //domain : Cube, - config : &FWConfig, - iterator : I, - plotter : SeqPlotter, -) -> DiscreteMeasure, F> -where F : Float + ToNalgebraRealField, - I : AlgIteratorFactory>, - for<'b> &'b A::Observable : std::ops::Neg, - //+ std::ops::Mul, <-- FIXME: compiler overflow - A::Observable : std::ops::MulAssign, - GA : SupportGenerator + Clone, - A : ForwardModel, F, PreadjointCodomain = BTFN>, - BTA : BTSearch>, - S: RealMapping + LocalAnalysis, N>, - BTNodeLookup: BTNode, N>, - Cube: P2Minimise, F>, - PlotLookup : Plotting, - DiscreteMeasure, F> : SpikeMerging { - - pointsource_fw_reg(opA, b, NonnegRadonRegTerm(α), config, iterator, plotter) -} - -#[deprecated(note = "Use `WeightOptim::optimise_weights`")] -pub fn optimise_weights<'a, F, A, I, const N : usize>( - μ : &mut DiscreteMeasure, F>, - opA : &'a A, - b : &A::Observable, - α : F, - findim_data : &FindimData, - inner : &InnerSettings, - iterator : I -) -> usize -where F : Float + ToNalgebraRealField, - I : AlgIteratorFactory, - A : ForwardModel, F> -{ - NonnegRadonRegTerm(α).optimise_weights(μ, opA, b, findim_data, inner, iterator) -} diff -r eb98b05b9c60 -r 87649ccfa6a8 src/pdps.rs --- a/src/pdps.rs Fri Apr 28 08:19:05 2023 +0300 +++ b/src/pdps.rs Fri Apr 28 08:20:51 2023 +0300 @@ -49,7 +49,6 @@ use clap::ValueEnum; use alg_tools::iterate:: AlgIteratorFactory; -use alg_tools::sets::Cube; use alg_tools::loc::Loc; use alg_tools::euclidean::Euclidean; use alg_tools::norms::{ @@ -63,7 +62,6 @@ BTNodeLookup, BTNode, BTSearch, - P2Minimise, SupportGenerator, LocalAnalysis, }; @@ -91,7 +89,6 @@ generic_pointsource_fb_reg, RegTerm, }; -use crate::regularisation::NonnegRadonRegTerm; /// Acceleration #[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, ValueEnum, Debug)] @@ -356,41 +353,3 @@ ) } -// -// Deprecated interfaces -// - -#[deprecated(note = "Use `pointsource_pdps_reg`")] -pub fn pointsource_pdps<'a, F, I, A, GA, 𝒟, BTA, G𝒟, S, K, D, const N : usize>( - opA : &'a A, - b : &'a A::Observable, - α : F, - op𝒟 : &'a 𝒟, - config : &PDPSConfig, - iterator : I, - plotter : SeqPlotter, - dataterm : D, -) -> DiscreteMeasure, F> -where F : Float + ToNalgebraRealField, - I : AlgIteratorFactory>, - for<'b> &'b A::Observable : std::ops::Neg - + std::ops::Add, - A::Observable : std::ops::MulAssign, - GA : SupportGenerator + Clone, - A : ForwardModel, F, PreadjointCodomain = BTFN> - + Lipschitz<𝒟, FloatType=F>, - BTA : BTSearch>, - G𝒟 : SupportGenerator + Clone, - 𝒟 : DiscreteMeasureOp, F, PreCodomain = PreBTFN>, - 𝒟::Codomain : RealMapping, - S: RealMapping + LocalAnalysis, N>, - K: RealMapping + LocalAnalysis, N>, - BTNodeLookup: BTNode, N>, - Cube: P2Minimise, F>, - PlotLookup : Plotting, - DiscreteMeasure, F> : SpikeMerging, - PDPS<'a, F, A, D, N> : FBSpecialisation, - D : Subdifferentiable { - - pointsource_pdps_reg(opA, b, NonnegRadonRegTerm(α), op𝒟, config, iterator, plotter, dataterm) -} diff -r eb98b05b9c60 -r 87649ccfa6a8 src/run.rs --- a/src/run.rs Fri Apr 28 08:19:05 2023 +0300 +++ b/src/run.rs Fri Apr 28 08:20:51 2023 +0300 @@ -367,7 +367,6 @@ .. } } = self; - #[allow(deprecated)] let regularisation = $reg_convert(self.data.$reg_field); println!("{}\n{}", @@ -655,47 +654,3 @@ opA.write_observable(&b_hat, pfx("b_hat"))?; opA.write_observable(&b, pfx("b_noisy")) } - -// -// Deprecated interface -// - -/// Struct for experiment configurations -#[derive(Debug, Clone, Serialize)] -pub struct Experiment -where F : Float, - [usize; N] : Serialize, - NoiseDistr : Distribution, - S : Sensor, - P : Spread, - K : SimpleConvolutionKernel, -{ - /// Domain $Ω$. - pub domain : Cube, - /// Number of sensors along each dimension - pub sensor_count : [usize; N], - /// Noise distribution - pub noise_distr : NoiseDistr, - /// Seed for random noise generation (for repeatable experiments) - pub noise_seed : u64, - /// Sensor $θ$; $θ * ψ$ forms the forward operator $𝒜$. - pub sensor : S, - /// Spread $ψ$; $θ * ψ$ forms the forward operator $𝒜$. - pub spread : P, - /// Kernel $ρ$ of $𝒟$. - pub kernel : K, - /// True point sources - pub μ_hat : DiscreteMeasure, F>, - /// Regularisation parameter - #[deprecated(note = "Use [`ExperimentV2`], which replaces `α` by more generic `regularisation`")] - pub α : F, - /// For plotting : how wide should the kernels be plotted - pub kernel_plot_width : F, - /// Data term - pub dataterm : DataTerm, - /// A map of default configurations for algorithms - #[serde(skip)] - pub algorithm_defaults : HashMap>, -} - -impl_experiment!(Experiment, α, Regularisation::NonnegRadon); diff -r eb98b05b9c60 -r 87649ccfa6a8 src/subproblem.rs --- a/src/subproblem.rs Fri Apr 28 08:19:05 2023 +0300 +++ b/src/subproblem.rs Fri Apr 28 08:20:51 2023 +0300 @@ -15,13 +15,6 @@ pub mod nonneg; pub mod unconstrained; -#[deprecated(since = "1.0.1", note = "Moved to submodule nonneg")] -pub use nonneg::{ - quadratic_nonneg, - quadratic_nonneg_ssn, - quadratic_nonneg_fb -}; - /// Method for solving finite-dimensional subproblems #[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Debug)] #[allow(dead_code)]