src/prox_penalty/wave.rs

branch
dev
changeset 62
32328a74c790
parent 61
4f468d35fa29
--- a/src/prox_penalty/wave.rs	Thu Feb 26 11:38:43 2026 -0500
+++ b/src/prox_penalty/wave.rs	Fri Jan 16 19:39:22 2026 -0500
@@ -2,7 +2,10 @@
 Basic proximal penalty based on convolution operators $𝒟$.
  */
 
-use super::{InsertionConfig, ProxPenalty, ProxTerm, StepLengthBound, StepLengthBoundPD};
+use super::{
+    InsertionConfig, ProxPenalty, ProxTerm, StepLengthBound, StepLengthBoundPD,
+    StepLengthBoundValue,
+};
 use crate::dataterm::QuadraticDataTerm;
 use crate::forward_model::ForwardModel;
 use crate::measures::merging::SpikeMerging;
@@ -194,9 +197,11 @@
     fn step_length_bound(
         &self,
         f: &QuadraticDataTerm<F, DiscreteMeasure<Domain, F>, A>,
-    ) -> DynResult<F> {
-        // TODO: direct squared calculation
-        Ok(f.operator().opnorm_bound(self, L2)?.powi(2))
+    ) -> StepLengthBoundValue<F> {
+        match f.operator().opnorm_bound(self, L2) {
+            Err(_) => StepLengthBoundValue::Failure,
+            Ok(l) => StepLengthBoundValue::LipschitzFactor(l.powi(2)),
+        }
     }
 }
 

mercurial