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.OneMax/3.3/Analyzers/BestOneMaxSolutionAnalyzer.cs

    r4068 r4722  
    2121
    2222using System.Linq;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Data;
     
    3536  [Item("BestOneMaxSolutionAnalyzer", "An operator for analyzing the best solution for a OneMax problem.")]
    3637  [StorableClass]
    37   class BestOneMaxSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
     38  public class BestOneMaxSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
    3839    public LookupParameter<BoolValue> MaximizationParameter {
    3940      get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
     
    5556    }
    5657
     58    [StorableConstructor]
     59    protected BestOneMaxSolutionAnalyzer(bool deserializing) : base(deserializing) { }
     60    protected BestOneMaxSolutionAnalyzer(BestOneMaxSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
    5761    public BestOneMaxSolutionAnalyzer()
    5862      : base() {
     
    6367      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the Onemax solution should be stored."));
    6468      Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution."));
     69    }
     70
     71    public override IDeepCloneable Clone(Cloner cloner) {
     72      return new BestOneMaxSolutionAnalyzer(this, cloner);
    6573    }
    6674
Note: See TracChangeset for help on using the changeset viewer.