Changeset 15301 for trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/EvaluationTracker.cs
- Timestamp:
- 08/01/17 11:07:48 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/EvaluationTracker.cs
r14185 r15301 27 27 using HeuristicLab.Encodings.BinaryVectorEncoding; 28 28 using HeuristicLab.Parameters; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 using HeuristicLab.Problems.Binary; 30 31 … … 33 34 // B. W. Goldman and W. F. Punch, "Parameter-less Population Pyramid," GECCO, pp. 785–792, 2014 34 35 // and the original source code in C++11 available from: https://github.com/brianwgoldman/Parameter-less_Population_Pyramid 36 [StorableClass] 35 37 internal sealed class EvaluationTracker : BinaryProblem { 38 [Storable] 36 39 private readonly BinaryProblem problem; 37 40 [Storable] 38 41 private int maxEvaluations; 39 42 40 43 #region Properties 44 [Storable] 41 45 public double BestQuality { 42 46 get; 43 47 private set; 44 48 } 45 49 [Storable] 46 50 public int Evaluations { 47 51 get; 48 52 private set; 49 53 } 50 54 [Storable] 51 55 public int BestFoundOnEvaluation { 52 56 get; 53 57 private set; 54 58 } 55 59 [Storable] 56 60 public BinaryVector BestSolution { 57 61 get; … … 59 63 } 60 64 #endregion 65 66 67 [StorableConstructor] 68 private EvaluationTracker(bool deserializing) : base(deserializing) { } 61 69 62 70 private EvaluationTracker(EvaluationTracker original, Cloner cloner) … … 67 75 Evaluations = original.Evaluations; 68 76 BestFoundOnEvaluation = original.BestFoundOnEvaluation; 69 BestSolution = cloner.Clone( BestSolution);77 BestSolution = cloner.Clone(original.BestSolution); 70 78 } 71 79 public override IDeepCloneable Clone(Cloner cloner) { 72 80 return new EvaluationTracker(this, cloner); 73 81 } 82 74 83 public EvaluationTracker(BinaryProblem problem, int maxEvaluations) { 75 84 this.problem = problem;
Note: See TracChangeset
for help on using the changeset viewer.