--- a/src/discrete_gradient.rs Tue Dec 31 08:48:50 2024 -0500 +++ b/src/discrete_gradient.rs Mon Dec 23 23:27:45 2024 -0500 @@ -7,6 +7,7 @@ }; use crate::types::Float; use crate::instance::Instance; +use crate::mapping::ArithmeticTrue; use crate::linops::{Mapping, Linear, BoundedLinear, Adjointable, GEMV}; use crate::norms::{Norm, L2}; @@ -258,6 +259,8 @@ F : Float + nalgebra::RealField, { type Codomain = DVector<F>; + type ArithmeticOptIn = ArithmeticTrue; + fn apply<I : Instance<DVector<F>>>(&self, i : I) -> DVector<F> { let mut y = DVector::zeros(N * self.len()); self.apply_add(&mut y, i); @@ -302,6 +305,8 @@ F : Float + nalgebra::RealField, { type Codomain = DVector<F>; + type ArithmeticOptIn = ArithmeticTrue; + fn apply<I : Instance<DVector<F>>>(&self, i : I) -> DVector<F> { let mut y = DVector::zeros(self.len()); self.apply_add(&mut y, i);