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

    r15583 r16171  
    2121using System;
    2222using System.Collections.Generic;
     23using System.Linq;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
     
    3132  public class IHR6 : IHR {
    3233    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);
     34      var res = new List<double[]>();
     35      for (var i = 0; i <= 500; i++) {
     36        var r = new RealVector(objectives);
    3637        r[0] = 1 / 500.0 * i;
    3738        res.Add(this.Evaluate(r, objectives));
    3839      }
    3940      return res;
    40     }
    41 
    42     protected override double GetBestKnownHypervolume(int objectives) {
    43       return Hypervolume.Calculate(GetOptimalParetoFront(objectives), GetReferencePoint(objectives), GetMaximization(objectives));
    4441    }
    4542
     
    6562
    6663    protected override double G(RealVector y) {
    67       double sum = 0.0;
    68       for (int i = 1; i < y.Length; i++) {
     64      var sum = 0.0;
     65      for (var i = 1; i < y.Length; i++) {
    6966        sum += HG(y[i]);
    7067      }
Note: See TracChangeset for help on using the changeset viewer.