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/Misc/Fonseca.cs

    r15583 r16171  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Encodings.RealVectorEncoding;
     28using HeuristicLab.Optimization;
    2729using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
     
    4446
    4547    protected override double GetBestKnownHypervolume(int objectives) {
    46       return Hypervolume.Calculate(GetOptimalParetoFront(objectives), GetReferencePoint(objectives), GetMaximization(objectives));
     48      return HypervolumeCalculator.CalculateHypervolume(GetOptimalParetoFront(objectives).ToArray(), GetReferencePoint(objectives), GetMaximization(objectives));
    4749    }
    4850
     
    6567
    6668      //objective1
    67       for (int i = 0; i < r.Length; i++) {
    68         double d = r[i] - aux;
     69      for (var i = 0; i < r.Length; i++) {
     70        var d = r[i] - aux;
    6971        f0 += d * d;
    7072      }
     
    7274
    7375      //objective2
    74       double f1 = 0.0;
    75       for (int i = 0; i < r.Length; i++) {
    76         double d = r[i] + aux;
     76      var f1 = 0.0;
     77      for (var i = 0; i < r.Length; i++) {
     78        var d = r[i] + aux;
    7779        f1 += d * d;
    7880      }
Note: See TracChangeset for help on using the changeset viewer.