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