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/Manipulators/ReplaceBranchManipulation.cs

    r4189 r4722  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Data;
     28using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
    2729using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
    2830using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
    3031
    3132namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
    3233  [StorableClass]
    3334  [Item("ReplaceBranchManipulation", "Selects a branch of the tree randomly and replaces it with a newly initialized branch (using PTC2).")]
    34   public class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator {
     35  public sealed class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator {
     36    [StorableConstructor]
     37    private ReplaceBranchManipulation(bool deserializing) : base(deserializing) { }
     38    private ReplaceBranchManipulation(ReplaceBranchManipulation original, Cloner cloner) : base(original, cloner) { }
     39    public ReplaceBranchManipulation() : base() { }
    3540
    36     public ReplaceBranchManipulation()
    37       : base() {
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new ReplaceBranchManipulation(this, cloner);
    3843    }
    3944
Note: See TracChangeset for help on using the changeset viewer.