Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Example.cs @ 14897

Last change on this file since 14897 was 14897, checked in by pkimmesw, 8 years ago

#2665 Dynamic ErcValues, Separate Push from BenchmarkSuite Push

File size: 4.5 KB
Line 
1namespace HeuristicLab.BenchmarkSuite {
2
3  using HeuristicLab.Common;
4  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6  [StorableClass]
7  public class Example : DeepCloneable {
8    private static readonly long[] emptyIntegers = new long[0];
9    private static readonly double[] emptyFloats = new double[0];
10    private static readonly bool[] emptyBooleans = new bool[0];
11    private static readonly char[] emptyChars = new char[0];
12    private static readonly string[] emptyStrings = new string[0];
13    private static readonly long[][] emptyIntegerVectors = new long[0][];
14    private static readonly double[][] emptyFloatVectors = new double[0][];
15    private static readonly bool[][] emptyBooleanVectors = new bool[0][];
16    private static readonly string[][] emptyStringVectors = new string[0][];
17
18
19    public Example() {
20      InputInteger = emptyIntegers;
21      InputFloat = emptyFloats;
22      InputBoolean = emptyBooleans;
23      InputChar = emptyChars;
24      InputString = emptyStrings;
25      InputIntegerVector = emptyIntegerVectors;
26      InputFloatVector = emptyFloatVectors;
27      InputBooleanVector = emptyBooleanVectors;
28      InputStringVector = emptyStringVectors;
29
30      OutputInteger = emptyIntegers;
31      OutputFloat = emptyFloats;
32      OutputBoolean = emptyBooleans;
33      OutputChar = emptyChars;
34      OutputString = emptyStrings;
35      OutputIntegerVector = emptyIntegerVectors;
36      OutputFloatVector = emptyFloatVectors;
37      OutputBooleanVector = emptyBooleanVectors;
38      OutputStringVector = emptyStringVectors;
39      OutputPrint = string.Empty;
40    }
41
42    public Example(Example origin, Cloner cloner) : base(origin, cloner) {
43      InputArgs = (string[])origin.InputArgs.Clone();
44      OutputArgs = (string[])origin.OutputArgs.Clone();
45
46      InputBoolean = (bool[])origin.InputBoolean.Clone();
47      InputInteger = (long[])origin.InputInteger.Clone();
48      InputFloat = (double[])origin.InputFloat.Clone();
49      InputChar = (char[])origin.InputChar.Clone();
50      InputString = (string[])origin.InputString.Clone();
51      InputIntegerVector = (long[][])origin.InputIntegerVector.Clone();
52      InputFloatVector = (double[][])origin.InputFloatVector.Clone();
53      InputBooleanVector = (bool[][])origin.InputBooleanVector.Clone();
54      InputStringVector = (string[][])origin.InputStringVector.Clone();
55
56      OutputBoolean = (bool[])origin.OutputBoolean.Clone();
57      OutputInteger = (long[])origin.OutputInteger.Clone();
58      OutputFloat = (double[])origin.OutputFloat.Clone();
59      OutputChar = (char[])origin.OutputChar.Clone();
60      OutputString = (string[])origin.OutputString.Clone();
61      OutputIntegerVector = (long[][])origin.OutputIntegerVector.Clone();
62      OutputFloatVector = (double[][])origin.OutputFloatVector.Clone();
63      OutputBooleanVector = (bool[][])origin.OutputBooleanVector.Clone();
64      OutputStringVector = (string[][])origin.OutputStringVector.Clone();
65      OutputPrint = origin.OutputPrint;
66    }
67
68    [StorableConstructor]
69    public Example(bool deserializing) { }
70
71    [Storable]
72    public string[] InputArgs { get; set; }
73    [Storable]
74    public string[] OutputArgs { get; set; }
75
76    [Storable]
77    public long[] InputInteger { get; set; }
78    [Storable]
79    public double[] InputFloat { get; set; }
80    [Storable]
81    public bool[] InputBoolean { get; set; }
82    [Storable]
83    public char[] InputChar { get; set; }
84    [Storable]
85    public string[] InputString { get; set; }
86    [Storable]
87    public long[][] InputIntegerVector { get; set; }
88    [Storable]
89    public double[][] InputFloatVector { get; set; }
90    [Storable]
91    public bool[][] InputBooleanVector { get; set; }
92    [Storable]
93    public string[][] InputStringVector { get; set; }
94
95    [Storable]
96    public long[] OutputInteger { get; set; }
97    [Storable]
98    public double[] OutputFloat { get; set; }
99    [Storable]
100    public bool[] OutputBoolean { get; set; }
101    [Storable]
102    public char[] OutputChar { get; set; }
103    [Storable]
104    public string[] OutputString { get; set; }
105    [Storable]
106    public long[][] OutputIntegerVector { get; set; }
107    [Storable]
108    public double[][] OutputFloatVector { get; set; }
109    [Storable]
110    public bool[][] OutputBooleanVector { get; set; }
111    [Storable]
112    public string[][] OutputStringVector { get; set; }
113    [Storable]
114    public string OutputPrint { get; set; }
115
116    public override IDeepCloneable Clone(Cloner cloner) {
117      return new Example(this, cloner);
118    }
119  }
120}
Note: See TracBrowser for help on using the repository browser.