--- a/src/operator_arithmetic.rs Mon Dec 30 15:46:28 2024 -0500 +++ b/src/operator_arithmetic.rs Mon Jan 06 20:29:25 2025 -0500 @@ -2,7 +2,7 @@ Arithmetic of [`Mapping`]s. */ -use serde::Serialize; +use serde::{Serialize, Deserialize}; use crate::types::*; use crate::instance::{Space, Instance}; use crate::mapping::{Mapping, DifferentiableImpl, DifferentiableMapping}; @@ -22,7 +22,7 @@ } /// Weighting of a [`Mapping`] by scalar multiplication. -#[derive(Copy,Clone,Debug,Serialize)] +#[derive(Copy,Clone,Debug,Serialize,Deserialize)] pub struct Weighted<T, C : Constant> { /// The weight pub weight : C, @@ -73,7 +73,7 @@ } /// A sum of [`Mapping`]s. -#[derive(Serialize, Debug, Clone)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct MappingSum<M>(Vec<M>); impl< M> MappingSum<M> {