Changeset 15301 for trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Population.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/Population.cs
r14185 r15301 22 22 23 23 using System.Collections.Generic; 24 using System.Linq; 25 using HeuristicLab.Common; 24 26 using HeuristicLab.Core; 25 27 using HeuristicLab.Encodings.BinaryVectorEncoding; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 29 27 30 namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid { … … 29 32 // B. W. Goldman and W. F. Punch, "Parameter-less Population Pyramid," GECCO, pp. 785–792, 2014 30 33 // and the original source code in C++11 available from: https://github.com/brianwgoldman/Parameter-less_Population_Pyramid 31 public class Population { 34 [StorableClass] 35 public class Population : DeepCloneable { 36 [Storable] 32 37 public List<BinaryVector> Solutions { 33 38 get; 34 39 private set; 35 40 } 36 41 [Storable] 37 42 public LinkageTree Tree { 38 43 get; 39 44 private set; 45 } 46 47 48 [StorableConstructor] 49 protected Population(bool deserializing) : base() { } 50 51 52 protected Population(Population original, Cloner cloner) : base(original, cloner) { 53 Solutions = original.Solutions.Select(cloner.Clone).ToList(); 54 Tree = cloner.Clone(original.Tree); 55 } 56 57 public override IDeepCloneable Clone(Cloner cloner) { 58 return new Population(this, cloner); 40 59 } 41 60
Note: See TracChangeset
for help on using the changeset viewer.