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

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
     
    4647    }
    4748
     49    [StorableConstructor]
     50    protected TSPCoordinatesPathEvaluator(bool deserializing) : base(deserializing) { }
     51    protected TSPCoordinatesPathEvaluator(TSPCoordinatesPathEvaluator original, Cloner cloner) : base(original, cloner) { }
    4852    protected TSPCoordinatesPathEvaluator()
    4953      : base() {
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEuclideanPathEvaluator.cs

    r4068 r4722  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3132  [StorableClass]
    3233  public sealed class TSPEuclideanPathEvaluator : TSPCoordinatesPathEvaluator {
     34    [StorableConstructor]
     35    private TSPEuclideanPathEvaluator(bool deserializing) : base(deserializing) { }
     36    private TSPEuclideanPathEvaluator(TSPEuclideanPathEvaluator original, Cloner cloner) : base(original, cloner) { }
     37    public TSPEuclideanPathEvaluator() : base() { }
     38
     39    public override IDeepCloneable Clone(Cloner cloner) {
     40      return new TSPEuclideanPathEvaluator(this, cloner);
     41    }
     42   
    3343    /// <summary>
    3444    /// Calculates the distance between two points using the Euclidean distance metric.
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEvaluator.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
     
    4142    }
    4243
     44    [StorableConstructor]
     45    protected TSPEvaluator(bool deserializing) : base(deserializing) { }
     46    protected TSPEvaluator(TSPEvaluator original, Cloner cloner) : base(original, cloner) { }
    4347    protected TSPEvaluator()
    4448      : base() {
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPGeoPathEvaluator.cs

    r4068 r4722  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3334    private const double PI = 3.141592;
    3435    private const double RADIUS = 6378.388;
     36
     37    [StorableConstructor]
     38    private TSPGeoPathEvaluator(bool deserializing) : base(deserializing) { }
     39    private TSPGeoPathEvaluator(TSPGeoPathEvaluator original, Cloner cloner) : base(original, cloner) { }
     40    public TSPGeoPathEvaluator() : base() { }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new TSPGeoPathEvaluator(this, cloner);
     44    }
     45   
    3546
    3647    /// <summary>
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPRoundedEuclideanPathEvaluator.cs

    r4068 r4722  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3132  [StorableClass]
    3233  public sealed class TSPRoundedEuclideanPathEvaluator : TSPCoordinatesPathEvaluator {
     34    [StorableConstructor]
     35    private TSPRoundedEuclideanPathEvaluator(bool deserializing) : base(deserializing) { }
     36    private TSPRoundedEuclideanPathEvaluator(TSPRoundedEuclideanPathEvaluator original, Cloner cloner) : base(original, cloner) { }
     37    public TSPRoundedEuclideanPathEvaluator() : base() { }
     38
     39    public override IDeepCloneable Clone(Cloner cloner) {
     40      return new TSPRoundedEuclideanPathEvaluator(this, cloner);
     41    }
     42   
    3343    /// <summary>
    3444    /// Calculates the distance between two points using the rounded Euclidean distance metric.
Note: See TracChangeset for help on using the changeset viewer.