Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/15 11:42:02 (9 years ago)
Author:
gkronber
Message:

#2472: merged r12921,r12936:12938,r12940,r12947,r13055:13058,r13163,r13267,r13269 from trunk to stable

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs

    r12911 r13280  
    2626
    2727namespace HeuristicLab.Problems.GeneticProgramming.LawnMower {
    28   public class Interpreter {
     28  public static class Interpreter {
    2929    private enum Heading {
    3030      South,
     
    4545    }
    4646
    47 
    4847    public static bool[,] EvaluateLawnMowerProgram(int length, int width, ISymbolicExpressionTree tree) {
    49 
    5048      bool[,] lawn = new bool[length, width];
    5149      var mowerState = new MowerState();
     
    5654      return lawn;
    5755    }
    58 
    5956
    6057    private static Tuple<int, int> EvaluateLawnMowerProgram(ISymbolicExpressionTreeNode node, MowerState mowerState, bool[,] lawn, IEnumerable<ISymbolicExpressionTreeNode> adfs) {
  • stable/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs

    r12911 r13280  
    5050    }
    5151
     52    #region item cloning and persistence
    5253    [StorableConstructor]
    53     protected Problem(bool deserializing)
    54       : base(deserializing) {
     54    protected Problem(bool deserializing) : base(deserializing) { }
     55    [StorableHook(HookType.AfterDeserialization)]
     56    private void AfterDeserialization() { }
     57
     58    protected Problem(Problem original, Cloner cloner) : base(original, cloner) { }
     59    public override IDeepCloneable Clone(Cloner cloner) {
     60      return new Problem(this, cloner);
    5561    }
    56     protected Problem(Problem original, Cloner cloner)
    57       : base(original, cloner) {
    58     }
     62    #endregion
     63
    5964    public Problem()
    6065      : base() {
     
    8792    }
    8893
    89 
    90     [StorableHook(HookType.AfterDeserialization)]
    91     private void AfterDeserialization() { }
    92 
    9394    public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) {
    9495      var length = LawnLengthParameter.Value.Value;
     
    105106      return numberOfMowedCells;
    106107    }
    107 
    108     public override IDeepCloneable Clone(Cloner cloner) {
    109       return new Problem(this, cloner);
    110     }
    111108  }
    112109}
  • stable/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs

    r12911 r13280  
    3737    public double Quality { get; private set; }
    3838
     39    #region item cloning and persistence
    3940    [StorableConstructor]
    4041    private Solution(bool deserializing) : base(deserializing) { }
     42    [StorableHook(HookType.AfterDeserialization)]
     43    private void AfterDeserialization() { }
     44
    4145    private Solution(Solution original, Cloner cloner)
    4246      : base(original, cloner) {
     
    4650      this.Quality = original.Quality;
    4751    }
     52    public override IDeepCloneable Clone(Cloner cloner) {
     53      return new Solution(this, cloner);
     54    }
     55    #endregion
    4856
    4957    public Solution(ISymbolicExpressionTree tree, int length, int width, double quality)
     
    5462      this.Quality = quality;
    5563    }
    56     [StorableHook(HookType.AfterDeserialization)]
    57     private void AfterDeserialization() {
    58     }
    59     public override IDeepCloneable Clone(Cloner cloner) {
    60       return new Solution(this, cloner);
    61     }
    6264  }
    6365}
Note: See TracChangeset for help on using the changeset viewer.