Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs

    r4524 r4722  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Linq;
     25using HeuristicLab.Common;
    2426using HeuristicLab.Core;
    2527using HeuristicLab.Data;
    2628using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
    2729using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System;
    2930
    3031namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
     
    3637  [StorableClass]
    3738  public sealed class ArgumentCreater : SymbolicExpressionTreeArchitectureManipulator {
     39    [StorableConstructor]
     40    private ArgumentCreater(bool deserializing) : base(deserializing) { }
     41    private ArgumentCreater(ArgumentCreater original, Cloner cloner) : base(original, cloner) { }
     42    public ArgumentCreater() : base() { }
    3843    public override sealed void ModifyArchitecture(
    3944      IRandom random,
     
    4449      out bool success) {
    4550      success = CreateNewArgument(random, symbolicExpressionTree, grammar, maxTreeSize.Value, maxTreeHeight.Value, maxFunctionDefiningBranches.Value, maxFunctionArguments.Value);
     51    }
     52
     53    public override IDeepCloneable Clone(Cloner cloner) {
     54      return new ArgumentCreater(this, cloner);
    4655    }
    4756
     
    91100      }
    92101    }
    93 
    94102
    95103    private static bool CreateNewArgumentForDefun(IRandom random, SymbolicExpressionTree tree, DefunTreeNode defunBranch, ArgumentTreeNode newArgumentNode) {
Note: See TracChangeset for help on using the changeset viewer.