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/Moves/TwoOpt/InversionMoveAbsoluteAttribute.cs

    r3376 r4722  
    3838
    3939    [StorableConstructor]
    40     private InversionMoveAbsoluteAttribute(bool deserializing)
    41       : base() {
     40    protected InversionMoveAbsoluteAttribute(bool deserializing) : base(deserializing) { }
     41    protected InversionMoveAbsoluteAttribute(InversionMoveAbsoluteAttribute original, Cloner cloner)
     42      : base(original, cloner) {
     43      this.Index1 = original.Index1;
     44      this.Number1 = original.Number1;
     45      this.Index2 = original.Index2;
     46      this.Number2 = original.Number2;
    4247    }
    43 
    44     public InversionMoveAbsoluteAttribute()
    45       : this(-1, -1, -1, -1, -1) { }
    46 
     48    public InversionMoveAbsoluteAttribute() : this(-1, -1, -1, -1, -1) { }
    4749    public InversionMoveAbsoluteAttribute(int index1, int number1, int index2, int number2, double moveQuality)
    4850      : base(moveQuality) {
     
    5456
    5557    public override IDeepCloneable Clone(Cloner cloner) {
    56       InversionMoveAbsoluteAttribute clone = (InversionMoveAbsoluteAttribute)base.Clone(cloner);
    57       clone.Index1 = Index1;
    58       clone.Number1 = Number1;
    59       clone.Index2 = Index2;
    60       clone.Number2 = Number2;
    61       return clone;
     58      return new InversionMoveAbsoluteAttribute(this, cloner);
    6259    }
    6360  }
Note: See TracChangeset for help on using the changeset viewer.