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:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.VehicleRouting

  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinOneLevelExchangeManipulator.cs

    r4352 r4722  
    2020#endregion
    2121
     22using System.Collections.Generic;
     23using HeuristicLab.Common;
    2224using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Parameters;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Data;
    27 using System.Collections.Generic;
    2826
    2927namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
     
    3331    [StorableConstructor]
    3432    private PotvinOneLevelExchangeMainpulator(bool deserializing) : base(deserializing) { }
     33    private PotvinOneLevelExchangeMainpulator(PotvinOneLevelExchangeMainpulator original, Cloner cloner)
     34      : base(original, cloner) {
     35    }
     36    public override IDeepCloneable Clone(Cloner cloner) {
     37      return new PotvinOneLevelExchangeMainpulator(this, cloner);
     38    }
     39    public PotvinOneLevelExchangeMainpulator() : base() { }
    3540
    36     public PotvinOneLevelExchangeMainpulator() : base() { }
    37    
    3841    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
    3942      int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
     
    5255
    5356      route1.Cities.RemoveAll(
    54         new System.Predicate<int>( 
     57        new System.Predicate<int>(
    5558          delegate(int val) {
    56             return (replaced.Contains(val)); 
     59            return (replaced.Contains(val));
    5760          }
    5861        )
Note: See TracChangeset for help on using the changeset viewer.