Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (13 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/ArgumentDuplicater.cs

    r4524 r4722  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
    2224using System.Linq;
     25using HeuristicLab.Common;
    2326using HeuristicLab.Core;
    2427using HeuristicLab.Data;
    2528using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
    2629using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    27 using System.Collections.Generic;
    28 using System;
    2930
    3031namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
     
    3637  [StorableClass]
    3738  public sealed class ArgumentDuplicater : SymbolicExpressionTreeArchitectureManipulator {
     39    [StorableConstructor]
     40    private ArgumentDuplicater(bool deserializing) : base(deserializing) { }
     41    private ArgumentDuplicater(ArgumentDuplicater original, Cloner cloner) : base(original, cloner) { }
     42    public ArgumentDuplicater() : base() { }
     43
    3844    public override sealed void ModifyArchitecture(
    3945      IRandom random,
     
    4450      out bool success) {
    4551      success = DuplicateArgument(random, symbolicExpressionTree, grammar, maxTreeSize.Value, maxTreeHeight.Value, maxFunctionDefiningBranches.Value, maxFunctionArguments.Value);
     52    }
     53
     54    public override IDeepCloneable Clone(Cloner cloner) {
     55      return new ArgumentDuplicater(this, cloner);
    4656    }
    4757
Note: See TracChangeset for help on using the changeset viewer.