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.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs

    r4477 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3334  [StorableClass]
    3435  public class Swap2Manipulator : PermutationManipulator {
     36    [StorableConstructor]
     37    protected Swap2Manipulator(bool deserializing) : base(deserializing) { }
     38    protected Swap2Manipulator(Swap2Manipulator original, Cloner cloner) : base(original, cloner) { }
     39    public Swap2Manipulator() : base() { }
     40
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new Swap2Manipulator(this, cloner);
     43    }
     44
    3545    /// <summary>
    3646    /// Swaps two randomly chosen elements in the given <paramref name="permutation"/> permutation.
Note: See TracChangeset for help on using the changeset viewer.