[14727] | 1 | namespace HeuristicLab.BenchmarkSuite.Problems {
|
---|
[14744] | 2 | using System;
|
---|
[14727] | 3 |
|
---|
| 4 | using HeuristicLab.Common;
|
---|
[14733] | 5 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
[14727] | 6 |
|
---|
[14733] | 7 | [StorableClass]
|
---|
[14727] | 8 | public class Example : DeepCloneable {
|
---|
| 9 | public Example() {
|
---|
| 10 | InputInt = new long[0];
|
---|
| 11 | InputFloat = new double[0];
|
---|
| 12 | InputBoolean = new bool[0];
|
---|
| 13 | OutputInt = InputInt;
|
---|
| 14 | OutputFloat = InputFloat;
|
---|
| 15 | OutputBoolean = InputBoolean;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | public Example(Example origin, Cloner cloner) : base(origin, cloner) {
|
---|
| 19 | origin.CopyTo(this);
|
---|
| 20 | }
|
---|
| 21 |
|
---|
[14733] | 22 | [StorableConstructor]
|
---|
| 23 | public Example(bool deserializing) { }
|
---|
| 24 |
|
---|
[14727] | 25 | public void CopyTo(Example example) {
|
---|
[14744] | 26 | Array.Copy(InputArgs, example.InputArgs, InputArgs.Length);
|
---|
| 27 | Array.Copy(OutputArgs, example.OutputArgs, OutputArgs.Length);
|
---|
[14727] | 28 |
|
---|
[14744] | 29 | Array.Copy(InputBoolean, example.InputBoolean, InputBoolean.Length);
|
---|
| 30 | Array.Copy(InputInt, example.InputInt, InputInt.Length);
|
---|
| 31 | Array.Copy(InputFloat, example.InputFloat, InputFloat.Length);
|
---|
[14727] | 32 |
|
---|
[14744] | 33 | Array.Copy(OutputBoolean, example.OutputBoolean, OutputBoolean.Length);
|
---|
| 34 | Array.Copy(OutputInt, example.OutputInt, OutputInt.Length);
|
---|
| 35 | Array.Copy(OutputFloat, example.OutputFloat, OutputFloat.Length);
|
---|
[14727] | 36 | }
|
---|
| 37 |
|
---|
[14733] | 38 | [Storable]
|
---|
[14727] | 39 | public string[] InputArgs { get; set; }
|
---|
[14733] | 40 | [Storable]
|
---|
[14727] | 41 | public string[] OutputArgs { get; set; }
|
---|
[14733] | 42 | [Storable]
|
---|
[14727] | 43 | public long[] InputInt { get; set; }
|
---|
[14733] | 44 | [Storable]
|
---|
[14727] | 45 | public double[] InputFloat { get; set; }
|
---|
[14733] | 46 | [Storable]
|
---|
[14727] | 47 | public bool[] InputBoolean { get; set; }
|
---|
[14733] | 48 | [Storable]
|
---|
[14727] | 49 | public long[] OutputInt { get; set; }
|
---|
[14733] | 50 | [Storable]
|
---|
[14727] | 51 | public double[] OutputFloat { get; set; }
|
---|
[14733] | 52 | [Storable]
|
---|
[14727] | 53 | public bool[] OutputBoolean { get; set; }
|
---|
| 54 |
|
---|
| 55 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 56 | return new Example(this, cloner);
|
---|
| 57 | }
|
---|
| 58 | }
|
---|
| 59 | }
|
---|