--- a/src/mapping/dataterm.rs Wed Apr 30 01:06:25 2025 -0500 +++ b/src/mapping/dataterm.rs Wed Apr 30 16:39:01 2025 -0500 @@ -7,11 +7,13 @@ use super::{DifferentiableImpl, DifferentiableMapping, LipschitzDifferentiableImpl, Mapping}; use crate::convex::ConvexMapping; +use crate::error::DynResult; use crate::instance::{Instance, Space}; use crate::linops::{BoundedLinear, Linear, Preadjointable}; use crate::norms::{Normed, L2}; use crate::types::Float; use std::ops::Sub; + //use serde::{Deserialize, Serialize}; /// Functions of the form $\frac{1}{2}\|Ax-b\|_2^2$ for an operator $A$ @@ -114,7 +116,7 @@ { type FloatType = F; - fn diff_lipschitz_factor(&self, seminorm: X::NormExp) -> Option<F> { - Some(self.opA.opnorm_bound(seminorm, L2).powi(2)) + fn diff_lipschitz_factor(&self, seminorm: X::NormExp) -> DynResult<F> { + Ok(self.opA.opnorm_bound(seminorm, L2)?.powi(2)) } }