Free cookie consent management tool by TermsFeed Policy Generator

Changeset 107


Ignore:
Timestamp:
03/28/08 11:38:43 (16 years ago)
Author:
swagner
Message:

Fixed ticket #87

  • used a static method Apply in each test function evaluation operator
Location:
trunk/sources/HeuristicLab.TestFunctions
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.TestFunctions/AckleyEvaluator.cs

    r2 r107  
    3838    }
    3939
    40     protected override double EvaluateFunction(double[] point) {
     40    public static double Apply(double[] point) {
    4141      double result = 20 + Math.E;
    4242      double val;
     
    5757      return (result);
    5858    }
     59
     60    protected override double EvaluateFunction(double[] point) {
     61      return Apply(point);
     62    }
    5963  }
    6064}
  • trunk/sources/HeuristicLab.TestFunctions/GriewangkEvaluator.cs

    r2 r107  
    3838    }
    3939
    40     protected override double EvaluateFunction(double[] point) {
     40    public static double Apply(double[] point) {
    4141      double result = 0;
    4242      double val = 0;
     
    5353      return (result);
    5454    }
     55
     56    protected override double EvaluateFunction(double[] point) {
     57      return Apply(point);
     58    }
    5559  }
    5660}
  • trunk/sources/HeuristicLab.TestFunctions/RastriginEvaluator.cs

    r2 r107  
    3838    }
    3939
    40     protected override double EvaluateFunction(double[] point) {
     40    public static double Apply(double[] point) {
    4141      double result = 10 * point.Length;
    4242      for (int i = 0; i < point.Length; i++) {
     
    4646      return (result);
    4747    }
     48
     49    protected override double EvaluateFunction(double[] point) {
     50      return Apply(point);
     51    }
    4852  }
    4953}
  • trunk/sources/HeuristicLab.TestFunctions/RosenbrockEvaluator.cs

    r2 r107  
    3838    }
    3939
    40     protected override double EvaluateFunction(double[] point) {
     40    public static double Apply(double[] point) {
    4141      double result = 0;
    4242      for (int i = 0; i < point.Length - 1; i++) {
     
    4646      return result;
    4747    }
     48
     49    protected override double EvaluateFunction(double[] point) {
     50      return Apply(point);
     51    }
    4852  }
    4953}
  • trunk/sources/HeuristicLab.TestFunctions/SchwefelEvaluator.cs

    r2 r107  
    3838    }
    3939
    40     protected override double EvaluateFunction(double[] point) {
     40    public static double Apply(double[] point) {
    4141      double result = 418.982887272433 * point.Length;
    4242      for (int i = 0; i < point.Length; i++)
     
    4444      return (result);
    4545    }
     46
     47    protected override double EvaluateFunction(double[] point) {
     48      return Apply(point);
     49    }
    4650  }
    4751}
  • trunk/sources/HeuristicLab.TestFunctions/SphereEvaluator.cs

    r2 r107  
    3838    }
    3939
    40     protected override double EvaluateFunction(double[] point) {
     40    public static double Apply(double[] point) {
    4141      double result = 0;
    4242      for (int i = 0; i < point.Length; i++)
     
    4444      return result;
    4545    }
     46
     47    protected override double EvaluateFunction(double[] point) {
     48      return Apply(point);
     49    }
    4650  }
    4751}
Note: See TracChangeset for help on using the changeset viewer.