--- a/src/forward_pdps.rs Wed Aug 05 17:50:38 2026 -0500 +++ b/src/forward_pdps.rs Thu Aug 06 14:33:17 2026 -0500 @@ -16,7 +16,10 @@ use alg_tools::error::DynResult; use alg_tools::euclidean::ClosedEuclidean; use alg_tools::iterate::AlgIteratorFactory; -use alg_tools::linops::{BoundedLinear, IdOp, SimplyAdjointable, Space, ZeroOp, AXPY, GEMV}; +use alg_tools::linops::{ + BoundedLinear, IdOp, SimplyAdjointable, Space, StaticEuclideanOriginGenerator, ZeroOp, AXPY, + GEMV, +}; use alg_tools::mapping::{DifferentiableMapping, Instance}; use alg_tools::nalgebra_support::ToNalgebraRealField; use alg_tools::norms::L2; @@ -116,20 +119,19 @@ domain: &mut impl AdmissibleDomain<U>, ) -> DynResult<MeasureZ<F, Z, U>> where + F: Float + ToNalgebraRealField, U: Space + Clone, - F: Float + ToNalgebraRealField, I: AlgIteratorFactory<IterInfo<F>>, Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>>, - //Pair<S, Z>: ClosedMul<F>, // Doesn't really need to be closed, if make this signature more complex… S: ClosedMul<F>, + for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, DiscreteMeasure<U, F>: SpikeMerging<F>, Reg: RegTerm<U, F>, P: ProxPenalty<U, S, Reg, F>, - for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, KOpZ: BoundedLinear<Z, L2, L2, F, Codomain = Y> - + GEMV<F, Z, Y> - + SimplyAdjointable<Z, Y, Codomain = Y, AdjointCodomain = Z>, - KOpZ::SimpleAdjoint: GEMV<F, Y, Z>, + + GEMV<F, Z> + + SimplyAdjointable<Z, Y, AdjointCodomain = Z>, + KOpZ::SimpleAdjoint: GEMV<F, Y>, Y: ClosedEuclidean<F>, for<'b> &'b Y: Instance<Y>, Z: ClosedEuclidean<F> + AXPY, @@ -347,20 +349,21 @@ fnH: &H, ) -> DynResult<MeasureZ<F, Z, U>> where + F: Float + ToNalgebraRealField, U: Space + Clone, - F: Float + ToNalgebraRealField, + //for<'a> &'a U: Instance<U>, I: AlgIteratorFactory<IterInfo<F>>, Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>>, - //Pair<S, Z>: ClosedMul<F>, // Doesn't really need to be closed, if make this signature more complex… S: ClosedMul<F>, + for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, + //Pair<S, Z>: ClosedMul<F>, DiscreteMeasure<U, F>: SpikeMerging<F>, Reg: RegTerm<U, F>, P: ProxPenalty<U, S, Reg, F>, - for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, KOpZ: BoundedLinear<Z, L2, L2, F, Codomain = Y> - + GEMV<F, Z, Y> - + SimplyAdjointable<Z, Y, Codomain = Y, AdjointCodomain = Z>, - KOpZ::SimpleAdjoint: GEMV<F, Y, Z>, + + GEMV<F, Z> + + SimplyAdjointable<Z, Y, AdjointCodomain = Z>, + KOpZ::SimpleAdjoint: GEMV<F, Y>, Y: ClosedEuclidean<F>, for<'b> &'b Y: Instance<Y>, Z: ClosedEuclidean<F> + AXPY, @@ -404,8 +407,9 @@ domain: &mut impl AdmissibleDomain<U>, ) -> DynResult<MeasureZ<F, Z, U>> where + F: Float + ToNalgebraRealField, U: Space + Clone, - F: Float + ToNalgebraRealField, + for<'a> &'a U: Instance<U>, I: AlgIteratorFactory<IterInfo<F>>, Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>>, S: ClosedMul<F>, @@ -413,14 +417,13 @@ Reg: RegTerm<U, F>, P: ProxPenalty<U, S, Reg, F>, for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, - Z: ClosedEuclidean<F> + AXPY<Field = F> + Clone, + Z: ClosedEuclidean<F> + AXPY + Clone, for<'b> &'b Z: Instance<Z>, R: Prox<Z, Codomain = F>, Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, - // We should not need to explicitly require this: - for<'b> &'b Loc<0, F>: Instance<Loc<0, F>>, { - let opKz = ZeroOp::new_dualisable(Loc([]), z.dual_origin()); + let opKz: ZeroOp<Z, Loc<0, F>, _, _, F> = + ZeroOp::new_dualisable(StaticEuclideanOriginGenerator, z.dual_origin()); let fnH = Zero::new(); // Convert config. We don't implement From (that could be done with the o2o crate), as σd0 // needs to be chosen in a general case; for the problem of this fucntion, anything is valid. @@ -456,21 +459,20 @@ fnR: &R, ) -> DynResult<MeasureZ<F, Z, U>> where + F: Float + ToNalgebraRealField, U: Space + Clone, - F: Float + ToNalgebraRealField, + for<'a> &'a U: Instance<U>, I: AlgIteratorFactory<IterInfo<F>>, Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>>, - S: DifferentiableMapping<U, Codomain = F> + ClosedMul<F>, + S: ClosedMul<F>, DiscreteMeasure<U, F>: SpikeMerging<F>, Reg: RegTerm<U, F>, P: ProxPenalty<U, S, Reg, F>, for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, - Z: ClosedEuclidean<F> + AXPY<Field = F> + Clone, + Z: ClosedEuclidean<F> + AXPY + Clone, for<'b> &'b Z: Instance<Z>, R: Prox<Z, Codomain = F>, Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, - // We should not need to explicitly require this: - for<'b> &'b Loc<0, F>: Instance<Loc<0, F>>, { pointsource_fb_pair_dom( f,