Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/09/10 09:55:31 (14 years ago)
Author:
svonolfe
Message:

Merged relevant changes from the trunk into the branch (cloning,...) (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs

    r4383 r4752  
    7979    }
    8080
    81     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    82       AlbaLambdaInterchangeMove clone = new AlbaLambdaInterchangeMove();
    83 
    84       clone.Tour1 = Tour1;
    85       clone.Position1 = Position1;
    86       clone.Length1 = Length1;
    87 
    88       clone.Tour2 = Tour2;
    89       clone.Position2 = Position2;
    90       clone.Length2 = Length2;
    91 
    92       if (Individual != null)
    93         clone.Individual = Individual.Clone() as AlbaEncoding;
    94 
    95       cloner.RegisterClonedObject(this, clone);
    96       return clone;
     81    public override IDeepCloneable Clone(Cloner cloner) {
     82      return new AlbaLambdaInterchangeMove(this, cloner);
    9783    }
    9884
     85    protected AlbaLambdaInterchangeMove(AlbaLambdaInterchangeMove original, Cloner cloner)
     86      : base(original, cloner) {
     87      this.Tour1 = original.Tour1;
     88      this.Position1 = original.Position1;
     89      this.Length1 = original.Length1;
    9990
     91      this.Tour2 = original.Tour2;
     92      this.Position2 = original.Position2;
     93      this.Length2 = original.Length2;
     94
     95      this.Individual = cloner.Clone(Individual) as AlbaEncoding;
     96    }
    10097
    10198    #region IVRPMove Members
Note: See TracChangeset for help on using the changeset viewer.