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.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs

    r4513 r4722  
    2121
    2222using System.Linq;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Data;
     
    3536  [Item("BestKnapsackSolutionAnalyzer", "An operator for analyzing the best solution for a Knapsack problem.")]
    3637  [StorableClass]
    37   class BestKnapsackSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
     38  public class BestKnapsackSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
    3839    public LookupParameter<BoolValue> MaximizationParameter {
    3940      get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
     
    6768    }
    6869
     70    [StorableConstructor]
     71    protected BestKnapsackSolutionAnalyzer(bool deserializing) : base(deserializing) { }
     72    protected BestKnapsackSolutionAnalyzer(BestKnapsackSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
    6973    public BestKnapsackSolutionAnalyzer()
    7074      : base() {
     
    8084      Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution."));
    8185      Parameters.Add(new LookupParameter<BinaryVector>("BestKnownSolution", "The best known solution."));
     86    }
     87
     88    public override IDeepCloneable Clone(Cloner cloner) {
     89      return new BestKnapsackSolutionAnalyzer(this, cloner);
    8290    }
    8391
Note: See TracChangeset for help on using the changeset viewer.