Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 17:37:02 (14 years ago)
Author:
abeham
Message:

#922

  • Refactored HeuristicLab.Encodings.PermutationEncoding
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveRelativeAttribute.cs

    r3376 r4667  
    4242
    4343    [StorableConstructor]
    44     private TranslocationMoveRelativeAttribute(bool deserializing)
    45       : base() {
     44    protected TranslocationMoveRelativeAttribute(bool deserializing) : base(deserializing) { }
     45    protected TranslocationMoveRelativeAttribute(TranslocationMoveRelativeAttribute original, Cloner cloner)
     46      : base(original, cloner) {
     47      this.Edge1Source = original.Edge1Source;
     48      this.Edge1Target = original.Edge1Target;
     49      this.Edge2Source = original.Edge2Source;
     50      this.Edge2Target = original.Edge2Target;
     51      this.Edge3Source = original.Edge3Source;
     52      this.Edge3Target = original.Edge3Target;
    4653    }
    47 
    48     public TranslocationMoveRelativeAttribute()
    49       : this(-1, -1, -1, -1, -1, -1, -1) { }
    50 
     54    public TranslocationMoveRelativeAttribute() : this(-1, -1, -1, -1, -1, -1, -1) { }
    5155    public TranslocationMoveRelativeAttribute(int edge1Source, int edge1Target, int edge2Source, int edge2Target, int edge3Source, int edge3Target, double moveQuality)
    5256      : base(moveQuality) {
     
    6064
    6165    public override IDeepCloneable Clone(Cloner cloner) {
    62       TranslocationMoveRelativeAttribute clone = (TranslocationMoveRelativeAttribute)base.Clone(cloner);
    63       clone.Edge1Source = Edge1Source;
    64       clone.Edge1Target = Edge1Target;
    65       clone.Edge2Source = Edge2Source;
    66       clone.Edge2Target = Edge2Target;
    67       clone.Edge3Source = Edge3Source;
    68       clone.Edge3Target = Edge3Target;
    69       return clone;
     66      return new TranslocationMoveRelativeAttribute(this, cloner);
    7067    }
    7168  }
Note: See TracChangeset for help on using the changeset viewer.