| 207 |
207 |
| 208 // Insert and reweigh |
208 // Insert and reweigh |
| 209 prox_penalty.insert_and_reweigh(&mut μ, &mut τv, τ, ε, config, ®, &state, &mut stats)?; |
209 prox_penalty.insert_and_reweigh(&mut μ, &mut τv, τ, ε, config, ®, &state, &mut stats)?; |
| 210 |
210 |
| 211 // Prune and possibly merge spikes |
211 // Prune and possibly merge spikes |
| 212 if config.merge_now(&state) { |
212 config.if_merge_now(&state, |ins| { |
| 213 stats.merged += |
213 stats.merged += |
| 214 prox_penalty.merge_spikes_no_fitness(&mut μ, &mut τv, &μ_base, τ, ε, config, ®); |
214 prox_penalty.merge_spikes_no_fitness(&mut μ, &mut τv, &μ_base, τ, ε, ins, ®); |
| 215 } |
215 }); |
| 216 stats.inserted += μ.len() - μ_base.len(); |
216 stats.inserted += μ.len() - μ_base.len(); |
| 217 stats.pruned += prune_with_stats(&mut μ); |
217 stats.pruned += prune_with_stats(&mut μ); |
| 218 |
218 |
| 219 // Update step length parameters |
219 // Update step length parameters |
| 220 let ω = pdpsconfig.acceleration.accelerate(&mut τ, &mut σ, γ); |
220 let ω = pdpsconfig.acceleration.accelerate(&mut τ, &mut σ, γ); |