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/Sphere.cs

    r13393 r13403  
    3333  /// It is implemented as described in Beyer, H.-G. and Schwefel, H.-P. 2002. Evolution Strategies - A Comprehensive Introduction Natural Computing, 1, pp. 3-52.
    3434  /// </summary>
    35   [Item("SphereEvaluator", "Evaluates the Sphere function y = C * ||X||^Alpha on a given point. The optimum of this function is 0 at the origin. It is implemented as described in Beyer, H.-G. and Schwefel, H.-P. 2002. Evolution Strategies - A Comprehensive Introduction Natural Computing, 1, pp. 3-52.")]
     35  [Item("Sphere", "Evaluates the Sphere function y = C * ||X||^Alpha on a given point. The optimum of this function is 0 at the origin. It is implemented as described in Beyer, H.-G. and Schwefel, H.-P. 2002. Evolution Strategies - A Comprehensive Introduction Natural Computing, 1, pp. 3-52.")]
    3636  [StorableClass]
    37   public class SphereEvaluator : SingleObjectiveTestFunctionProblemEvaluator {
    38     public override string FunctionName { get { return "Sphere"; } }
     37  public class Sphere : SingleObjectiveTestFunction {
    3938    /// <summary>
    4039    /// Returns false as the Sphere function is a minimization problem.
     
    6968
    7069    public override IDeepCloneable Clone(Cloner cloner) {
    71       return new SphereEvaluator(this, cloner);
     70      return new Sphere(this, cloner);
    7271    }
    7372
     
    104103
    105104    [StorableConstructor]
    106     protected SphereEvaluator(bool deserializing) : base(deserializing) { }
    107     protected SphereEvaluator(SphereEvaluator original, Cloner cloner) : base(original, cloner) { }
     105    protected Sphere(bool deserializing) : base(deserializing) { }
     106    protected Sphere(Sphere original, Cloner cloner) : base(original, cloner) { }
    108107    /// <summary>
    109108    /// Initializes a new instance of the SphereEvaluator with two parameters (<c>C</c> and <c>Alpha</c>).
    110109    /// </summary>
    111     public SphereEvaluator()
     110    public Sphere()
    112111      : base() {
    113112      Parameters.Add(new ValueParameter<DoubleValue>("C", "The parameter C modifies the steepness of the objective function y = C * ||X||^Alpha. Default is C = 1.", new DoubleValue(1)));
Note: See TracChangeset for help on using the changeset viewer.