| 197 let mut stats = IterInfo::new(); |
197 let mut stats = IterInfo::new(); |
| 198 |
198 |
| 199 // Run the algorithm |
199 // Run the algorithm |
| 200 for state in iterator.iter_init(|| full_stats(&μ, &z, ε, stats.clone())) { |
200 for state in iterator.iter_init(|| full_stats(&μ, &z, ε, stats.clone())) { |
| 201 // Calculate initial transport |
201 // Calculate initial transport |
| 202 let Pair(mut τv, τz) = f.differential(Pair(&μ, &z)); |
202 let Pair(mut τv, τz) = f.differential(Pair(&μ, &z)) * τ; |
| 203 let μ_base = μ.clone(); |
203 let μ_base = μ.clone(); |
| 204 |
204 |
| 205 // Construct μ^{k+1} by solving finite-dimensional subproblems and insert new spikes. |
205 // Construct μ^{k+1} by solving finite-dimensional subproblems and insert new spikes. |
| 206 let (maybe_d, _within_tolerances) = prox_penalty.insert_and_reweigh( |
206 let (maybe_d, _within_tolerances) = prox_penalty.insert_and_reweigh( |
| 207 &mut μ, |
207 &mut μ, |