Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/25/15 23:24:01 (8 years ago)
Author:
abeham
Message:

#2521:

  • Adapted single-objective test function problem to new problem infrastructure
  • Added additional interfaces to RealVectorEncoding
  • Fixed IParticleUpdater interface (must implement IStochasticOperator if it contains a Random parameter)
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  
    3333  /// 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.
    3434  /// </summary
    35   [Item("RastriginEvaluator", "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.")]
    3636  [StorableClass]
    37   public class RastriginEvaluator : SingleObjectiveTestFunctionProblemEvaluator {
    38     public override string FunctionName { get { return "Rastrigin"; } }
     37  public class Rastrigin : SingleObjectiveTestFunction {
    3938    /// <summary>
    4039    /// Returns false as the Rastrigin function is a minimization problem.
     
    8685
    8786    [StorableConstructor]
    88     protected RastriginEvaluator(bool deserializing) : base(deserializing) { }
    89     protected RastriginEvaluator(RastriginEvaluator original, Cloner cloner) : base(original, cloner) { }
     87    protected Rastrigin(bool deserializing) : base(deserializing) { }
     88    protected Rastrigin(Rastrigin original, Cloner cloner) : base(original, cloner) { }
    9089    /// <summary>
    9190    /// Initializes a new instance of the RastriginEvaluator with one parameter (<c>A</c>).
    9291    /// </summary>
    93     public RastriginEvaluator()
     92    public Rastrigin()
    9493      : base() {
    9594      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)));
     
    9796
    9897    public override IDeepCloneable Clone(Cloner cloner) {
    99       return new RastriginEvaluator(this, cloner);
     98      return new Rastrigin(this, cloner);
    10099    }
    101100
Note: See TracChangeset for help on using the changeset viewer.