Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/21/18 09:18:49 (6 years ago)
Author:
bwerth
Message:

#2943 worked on MOBasicProblem - added Interfaces;reworked MOCalculators; several minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/IHR/IHR2.cs

    r15583 r16171  
    3131  public class IHR2 : IHR {
    3232    protected override IEnumerable<double[]> GetOptimalParetoFront(int objectives) {
    33       List<double[]> res = new List<double[]>();
    34       for (int i = 0; i <= 500; i++) {
    35         RealVector r = new RealVector(objectives);
     33      var res = new List<double[]>();
     34      for (var i = 0; i <= 500; i++) {
     35        var r = new RealVector(objectives);
    3636        r[0] = 1 / 500.0 * i;
    3737
     
    3939      }
    4040      return res;
    41     }
    42 
    43     protected override double GetBestKnownHypervolume(int objectives) {
    44       return Hypervolume.Calculate(GetOptimalParetoFront(objectives), GetReferencePoint(objectives), GetMaximization(objectives));
    4541    }
    4642
     
    6662
    6763    protected override double G(RealVector y) {
    68       double sum = 0.0;
    69       for (int i = 1; i < y.Length; i++) {
     64      var sum = 0.0;
     65      for (var i = 1; i < y.Length; i++) {
    7066        sum += HG(y[i]);
    7167      }
Note: See TracChangeset for help on using the changeset viewer.