src/prox_penalty.rs

changeset 94
88d994f2d63d
parent 90
b471a13e3136
--- a/src/prox_penalty.rs	Thu Aug 06 11:14:15 2026 -0500
+++ b/src/prox_penalty.rs	Tue Aug 04 23:47:29 2026 -0500
@@ -112,7 +112,9 @@
         state: &AlgIteratorIteration<I>,
         mut f: impl FnMut(&Self) -> DynResult<A>,
     ) -> DynResult<Option<A>> {
-        if (self.merging.enabled || self.merging.scaling.is_some())
+        if (self.merging.enabled
+            || self.merging.scaling.is_some()
+            || self.extra_weight_optimisation_steps > 0)
             && state.iteration() % self.merge_every == 0
         {
             if self.max_scaling_iter != 0 && state.iteration() > self.max_scaling_iter {
@@ -138,7 +140,9 @@
         state: &AlgIteratorIteration<I>,
         mut f: impl FnMut() -> A,
     ) -> Option<A> {
-        if (self.merging.enabled || self.merging.scaling.is_some())
+        if (self.merging.enabled
+            || self.merging.scaling.is_some()
+            || self.extra_weight_optimisation_steps > 0)
             && state.iteration() % self.merge_every == 0
         {
             if self.max_scaling_iter != 0 && state.iteration() > self.max_scaling_iter {

mercurial