namespace HeuristicLab.BenchmarkSuite.Problems { using System; using HeuristicLab.Common; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; [StorableClass] public class Example : DeepCloneable { public Example() { InputInt = new long[0]; InputFloat = new double[0]; InputBoolean = new bool[0]; OutputInt = InputInt; OutputFloat = InputFloat; OutputBoolean = InputBoolean; } public Example(Example origin, Cloner cloner) : base(origin, cloner) { origin.CopyTo(this); } [StorableConstructor] public Example(bool deserializing) { } public void CopyTo(Example example) { Array.Copy(InputArgs, example.InputArgs, InputArgs.Length); Array.Copy(OutputArgs, example.OutputArgs, OutputArgs.Length); Array.Copy(InputBoolean, example.InputBoolean, InputBoolean.Length); Array.Copy(InputInt, example.InputInt, InputInt.Length); Array.Copy(InputFloat, example.InputFloat, InputFloat.Length); Array.Copy(OutputBoolean, example.OutputBoolean, OutputBoolean.Length); Array.Copy(OutputInt, example.OutputInt, OutputInt.Length); Array.Copy(OutputFloat, example.OutputFloat, OutputFloat.Length); } [Storable] public string[] InputArgs { get; set; } [Storable] public string[] OutputArgs { get; set; } [Storable] public long[] InputInt { get; set; } [Storable] public double[] InputFloat { get; set; } [Storable] public bool[] InputBoolean { get; set; } [Storable] public long[] OutputInt { get; set; } [Storable] public double[] OutputFloat { get; set; } [Storable] public bool[] OutputBoolean { get; set; } public override IDeepCloneable Clone(Cloner cloner) { return new Example(this, cloner); } } }