src/sliding_pdps.rs

changeset 78
2a122736e91c
parent 75
677a5fd1b014
--- a/src/sliding_pdps.rs	Wed Jul 22 16:48:22 2026 -0500
+++ b/src/sliding_pdps.rs	Sun Jul 26 17:30:51 2026 -0500
@@ -303,21 +303,21 @@
         // Merge spikes.
         // This crucially expects the merge routine to be stable with respect to spike locations,
         // and not to performing any pruning. That is be to done below simultaneously for γ.
-        if config.insertion.merge_now(&state) {
+        config.insertion.if_merge_now(&state, |ins| {
             let m = prox_penalty.merge_spikes(
                 &mut μ,
                 &mut τv̆,
                 &μ̆,
                 τ,
                 ε,
-                &config.insertion,
+                ins,
                 &reg,
                 Some(|μ̃: &RNDM<N, F>| f.apply(Pair(μ̃, &z))),
             );
             if m > 0 {
                 stats.merged += m;
             }
-        }
+        });
 
         γ.prune_compat(&mut μ, &mut stats);
 

mercurial