Changeset 13403 for branches/ProblemRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Functions/Rastrigin.cs
- Timestamp:
- 11/25/15 23:24:01 (8 years ago)
- Location:
- branches/ProblemRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Functions
- Files:
-
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Functions/Rastrigin.cs
r13393 r13403 33 33 /// It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg. 34 34 /// </summary 35 [Item("Rastrigin Evaluator", "Evaluates the generalized Rastrigin function y = Sum((x_i)^2 + A * (1 - Cos(2pi*x_i))) on a given point. The optimum of this function is 0 at the origin. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]35 [Item("Rastrigin", "Evaluates the generalized Rastrigin function y = Sum((x_i)^2 + A * (1 - Cos(2pi*x_i))) on a given point. The optimum of this function is 0 at the origin. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")] 36 36 [StorableClass] 37 public class RastriginEvaluator : SingleObjectiveTestFunctionProblemEvaluator { 38 public override string FunctionName { get { return "Rastrigin"; } } 37 public class Rastrigin : SingleObjectiveTestFunction { 39 38 /// <summary> 40 39 /// Returns false as the Rastrigin function is a minimization problem. … … 86 85 87 86 [StorableConstructor] 88 protected Rastrigin Evaluator(bool deserializing) : base(deserializing) { }89 protected Rastrigin Evaluator(RastriginEvaluatororiginal, Cloner cloner) : base(original, cloner) { }87 protected Rastrigin(bool deserializing) : base(deserializing) { } 88 protected Rastrigin(Rastrigin original, Cloner cloner) : base(original, cloner) { } 90 89 /// <summary> 91 90 /// Initializes a new instance of the RastriginEvaluator with one parameter (<c>A</c>). 92 91 /// </summary> 93 public Rastrigin Evaluator()92 public Rastrigin() 94 93 : base() { 95 94 Parameters.Add(new ValueParameter<DoubleValue>("A", "The parameter A is a parameter of the objective function y = Sum((x_i)^2 + A * (1 - Cos(2pi*x_i))). Default is A = 10.", new DoubleValue(10))); … … 97 96 98 97 public override IDeepCloneable Clone(Cloner cloner) { 99 return new Rastrigin Evaluator(this, cloner);98 return new Rastrigin(this, cloner); 100 99 } 101 100
Note: See TracChangeset
for help on using the changeset viewer.