diff -r 103aa137fcb2 -r 1256e7f7f7ad src/convex.rs --- a/src/convex.rs Tue Apr 29 07:55:18 2025 -0500 +++ b/src/convex.rs Wed Apr 30 00:23:04 2025 -0500 @@ -9,6 +9,7 @@ use crate::norms::*; use crate::operator_arithmetic::{Constant, Weighted}; use crate::types::*; +use serde::{Deserialize, Serialize}; use std::marker::PhantomData; /// Trait for convex mappings. Has no features, just serves as a constraint @@ -74,6 +75,7 @@ } /// Constraint to the unit ball of the norm described by `E`. +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] pub struct NormConstraint { radius: F, norm: NormMapping, @@ -178,6 +180,7 @@ } /// Projection to the unit ball of the norm described by `E`. +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] pub struct NormProjection { radius: F, exponent: E, @@ -211,6 +214,7 @@ } /// The zero mapping +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] pub struct Zero(PhantomData<(Domain, F)>); impl Zero { @@ -271,6 +275,7 @@ } /// The zero indicator +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] pub struct ZeroIndicator(PhantomData<(Domain, F)>); impl ZeroIndicator { @@ -319,6 +324,7 @@ } /// The squared Euclidean norm divided by two +#[derive(Copy, Clone, Serialize, Deserialize)] pub struct Norm222(PhantomData); impl,*/ F: Float> Norm222 {