Changeset 17544 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Binary/3.3/HIFFProblem.cs
- Timestamp:
- 05/18/20 18:55:08 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Binary/3.3/HIFFProblem.cs
r17382 r17544 27 27 using HeuristicLab.Common; 28 28 using HeuristicLab.Core; 29 using HeuristicLab.Data; 29 30 using HeuristicLab.Encodings.BinaryVectorEncoding; 30 31 using HeuristicLab.Optimization; … … 35 36 [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 220)] 36 37 public class HIFFProblem : BinaryVectorProblem { 37 [StorableConstructor]38 protected HIFFProblem(StorableConstructorFlag _) : base(_) { }39 protected HIFFProblem(HIFFProblem original, Cloner cloner)40 : base(original, cloner) {41 }42 public override IDeepCloneable Clone(Cloner cloner) {43 return new HIFFProblem(this, cloner);44 }45 38 46 39 public HIFFProblem() : base() { 47 40 Maximization = true; 48 Encoding.Length = 64;41 DimensionRefParameter.ForceValue(new IntValue(64, @readonly: false)); 49 42 } 43 50 44 // In the GECCO paper, Section 4.1 51 45 public override ISingleObjectiveEvaluationResult Evaluate(BinaryVector individual, IRandom random, CancellationToken cancellationToken) { … … 87 81 return new SingleObjectiveEvaluationResult(quality); 88 82 } 83 84 [StorableConstructor] 85 protected HIFFProblem(StorableConstructorFlag _) : base(_) { } 86 protected HIFFProblem(HIFFProblem original, Cloner cloner) 87 : base(original, cloner) { 88 } 89 public override IDeepCloneable Clone(Cloner cloner) { 90 return new HIFFProblem(this, cloner); 91 } 89 92 } 90 93 }
Note: See TracChangeset
for help on using the changeset viewer.