--- a/src/convex.rs Wed Apr 30 00:29:16 2025 -0500 +++ b/src/convex.rs Wed Apr 30 00:48:56 2025 -0500 @@ -16,7 +16,14 @@ /// /// TODO: should constrain `Mapping::Codomain` to implement a partial order, /// but this makes everything complicated with little benefit. -pub trait ConvexMapping<Domain: Space, F: Num = f64>: Mapping<Domain, Codomain = F> {} +pub trait ConvexMapping<Domain: Space, F: Num = f64>: Mapping<Domain, Codomain = F> { + /// Returns (a lower estimate of) the factor of strong convexity. + /// + /// TODO: should include a specification of the respective norm. + fn factor_of_strong_convexity(&self) -> F { + F::ZERO + } +} /// Trait for mappings with a Fenchel conjugate /// @@ -293,7 +300,11 @@ } } -impl<Domain: Normed<F>, F: Float> ConvexMapping<Domain, F> for ZeroIndicator<Domain, F> {} +impl<Domain: Normed<F>, F: Float> ConvexMapping<Domain, F> for ZeroIndicator<Domain, F> { + fn factor_of_strong_convexity(&self) -> F { + F::INFINITY + } +} impl<Domain: HasDual<F>, F: Float> Conjugable<Domain, F> for ZeroIndicator<Domain, F> { type Conjugate<'a> @@ -342,7 +353,11 @@ } } -impl<Domain: Euclidean<F>, F: Float> ConvexMapping<Domain, F> for Norm222<F> {} +impl<Domain: Euclidean<F>, F: Float> ConvexMapping<Domain, F> for Norm222<F> { + fn factor_of_strong_convexity(&self) -> F { + F::ONE + } +} impl<Domain: Euclidean<F>, F: Float> Conjugable<Domain, F> for Norm222<F> { type Conjugate<'a>