src/fb.rs

changeset 4
5aa5c279e341
parent 0
eb3c7813b67a
--- a/src/fb.rs	Thu Dec 01 23:07:35 2022 +0200
+++ b/src/fb.rs	Sun Sep 25 21:45:56 2022 +0300
@@ -457,7 +457,7 @@
     iterator : I,
     plotter : SeqPlotter<F, N>
 ) -> DiscreteMeasure<Loc<F, N>, F>
-where F : Float + ToNalgebraRealField,
+where F : Float + ToNalgebraRealField<MixedType = F>,
       I : AlgIteratorFactory<IterInfo<F, N>>,
       for<'b> &'b A::Observable : std::ops::Neg<Output=A::Observable>,
                                   //+ std::ops::Mul<F, Output=A::Observable>,  <-- FIXME: compiler overflow
@@ -521,7 +521,7 @@
     mut residual : A::Observable,
     mut specialisation : Spec,
 ) -> DiscreteMeasure<Loc<F, N>, F>
-where F : Float + ToNalgebraRealField,
+where F : Float + ToNalgebraRealField<MixedType=F>,
       I : AlgIteratorFactory<IterInfo<F, N>>,
       Spec : FBSpecialisation<F, A::Observable, N>,
       A::Observable : std::ops::MulAssign<F>,
@@ -657,7 +657,7 @@
                                                μ.iter_locations()
                                                 .map(|ζ| minus_τv.apply(ζ) + ω0.apply(ζ))
                                                 .map(F::to_nalgebra_mixed));
-                let mut x = μ.masses_dvector();
+                let mut x = μ.masses_mut();
 
                 // The gradient of the forward component of the inner objective is C^*𝒟Cx - g̃.
                 // We have |C^*𝒟Cx|_2 = sup_{|z|_2 ≤ 1} ⟨z, C^*𝒟Cx⟩ = sup_{|z|_2 ≤ 1} ⟨Cz|𝒟Cx⟩
@@ -672,7 +672,7 @@
                                                 inner_τ, inner_it);
 
                 // Update masses of μ based on solution of finite-dimensional subproblem.
-                μ.set_masses_dvector(&x);
+                //μ.set_masses_dvector(&x);
             }
 
             // Form d = ω0 - τv - 𝒟μ = -𝒟(μ - μ^k) - τv for checking the proximate optimality

mercurial