diff -r bd13c2ae3450 -r 56c8adc32b09 src/forward_model.rs --- a/src/forward_model.rs Fri Apr 28 13:15:19 2023 +0300 +++ b/src/forward_model.rs Tue Dec 31 09:34:24 2024 -0500 @@ -14,7 +14,7 @@ pub use alg_tools::linops::*; use alg_tools::euclidean::Euclidean; use alg_tools::norms::{ - L1, Linfinity, Norm + L1, Linfinity, L2, Norm }; use alg_tools::bisection_tree::*; use alg_tools::mapping::RealMapping; @@ -27,7 +27,6 @@ use crate::types::*; use crate::measures::*; use crate::seminorms::{ - Lipschitz, ConvolutionOp, SimpleConvolutionKernel, }; @@ -36,6 +35,8 @@ AutoConvolution, BoundedBy, }; +use crate::types::L2Squared; +use crate::transport::TransportLipschitz; pub type RNDM = DiscreteMeasure, F>; @@ -558,7 +559,7 @@ /// /// **This assumes (but does not check) that the sensors are not overlapping.** #[replace_float_literals(F::cast_from(literal))] -impl Lipschitz> +impl<'a, F, BT, S, P, K, const N : usize> Lipschitz<&'a ConvolutionOp> for SensorGrid where F : Float + nalgebra::RealField + ToNalgebraRealField, BT : SensorGridBT, @@ -570,7 +571,7 @@ type FloatType = F; - fn lipschitz_factor(&self, seminorm : &ConvolutionOp) -> Option { + fn lipschitz_factor(&self, seminorm : &'a ConvolutionOp) -> Option { // Sensors should not take on negative values to allow // A_*A to be upper bounded by a simple convolution of `spread`. if self.sensor.bounds().lower() < 0.0 { @@ -590,6 +591,22 @@ } } +#[replace_float_literals(F::cast_from(literal))] +impl TransportLipschitz +for SensorGrid +where F : Float + nalgebra::RealField + ToNalgebraRealField, + BT : SensorGridBT, + S : Sensor, + P : Spread, + Convolution : Spread + Lipschitz { + type FloatType = F; + + fn transport_lipschitz_factor(&self, L2Squared : L2Squared) -> Self::FloatType { + todo!("Unimplemented") + } +} + + macro_rules! make_sensorgridsupportgenerator_scalarop_rhs { ($trait:ident, $fn:ident, $trait_assign:ident, $fn_assign:ident) => { impl