Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/23/17 01:11:18 (7 years ago)
Author:
pkimmesw
Message:

#2665 simplifier, push solution results view, performance improvements, small bug fixes, ui fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/Example.cs

    r14727 r14777  
    1 namespace HeuristicLab.BenchmarkSuite
    2 {
    3   public class Example
    4   {
    5     public string Input { get; set; }
     1namespace HeuristicLab.BenchmarkSuite {
     2  using System.Linq;
    63
    7     public string Output { get; set; }
     4  using HeuristicLab.Common;
     5  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     6
     7  [StorableClass]
     8  public class Example : DeepCloneable {
     9    public Example() {
     10      this.InputInt = new long[0];
     11      this.InputFloat = new double[0];
     12      this.InputBoolean = new bool[0];
     13      this.OutputInt = this.InputInt;
     14      this.OutputFloat = this.InputFloat;
     15      this.OutputBoolean = this.InputBoolean;
     16    }
     17
     18    public Example(Example origin, Cloner cloner) : base(origin, cloner) {
     19      origin.CopyTo(this);
     20    }
     21
     22    [StorableConstructor]
     23    public Example(bool deserializing) { }
     24
     25    public void CopyTo(Example example) {
     26      example.InputArgs = InputArgs.ToArray();
     27      example.OutputArgs = OutputArgs.ToArray();
     28
     29      example.InputBoolean = InputBoolean.ToArray();
     30      example.InputInt = InputInt.ToArray();
     31      example.InputFloat = InputFloat.ToArray();
     32
     33      example.OutputBoolean = OutputBoolean.ToArray();
     34      example.OutputInt = OutputInt.ToArray();
     35      example.OutputFloat = OutputFloat.ToArray();
     36    }
     37
     38    [Storable]
     39    public string[] InputArgs { get; set; }
     40    [Storable]
     41    public string[] OutputArgs { get; set; }
     42
     43    [Storable]
     44    public long[] InputInt { get; set; }
     45    [Storable]
     46    public double[] InputFloat { get; set; }
     47    [Storable]
     48    public bool[] InputBoolean { get; set; }
     49    [Storable]
     50    public char[] InputChar { get; set; }
     51    [Storable]
     52    public string[] InputString { get; set; }
     53
     54    [Storable]
     55    public long[] OutputInt { get; set; }
     56    [Storable]
     57    public double[] OutputFloat { get; set; }
     58    [Storable]
     59    public bool[] OutputBoolean { get; set; }
     60    [Storable]
     61    public char[] OutputChar { get; set; }
     62    [Storable]
     63    public string[] OutputString { get; set; }
     64
     65    public override IDeepCloneable Clone(Cloner cloner) {
     66      return new Example(this, cloner);
     67    }
    868  }
    969}
Note: See TracChangeset for help on using the changeset viewer.