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

    r15583 r16171  
    2020#endregion
    2121using System;
     22using System.Linq;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Encodings.RealVectorEncoding;
     25using HeuristicLab.Optimization;
    2426using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2527
     
    3638
    3739    protected override double[] GetReferencePoint(int objectives) {
    38       double[] rp = new double[objectives];
    39       for (int i = 0; i < objectives; i++) {
     40      var rp = new double[objectives];
     41      for (var i = 0; i < objectives; i++) {
    4042        rp[i] = 11;
    4143      }
     
    5860    protected abstract double G(RealVector y);
    5961
     62    protected override double GetBestKnownHypervolume(int objectives) {
     63      return HypervolumeCalculator.CalculateHypervolume(GetOptimalParetoFront(objectives).ToArray(), GetReferencePoint(objectives), GetMaximization(objectives));
     64    }
    6065
    6166    protected double H(double x, RealVector r) {
Note: See TracChangeset for help on using the changeset viewer.