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/DTLZ/DTLZ2.cs

    r15583 r16171  
    4848      }
    4949
    50       double[] res = new double[objectives];
     50      var res = new double[objectives];
    5151
    5252      //calculate g(Xm)
    5353      double g = 0;
    54       for (int i = objectives; i < r.Length; i++) {
    55         double d = r[i] - 0.5;
     54      for (var i = objectives; i < r.Length; i++) {
     55        var d = r[i] - 0.5;
    5656        g += d * d;
    5757      }
    5858
    5959      //calculating f0...fM-1
    60       for (int i = 0; i < objectives; i++) {
    61         double f = i == 0 ? 1 : (Math.Sin(r[objectives - i - 1] * Math.PI / 2)) * (1 + g);
    62         for (int j = 0; j < objectives - i - 1; j++) {
     60      for (var i = 0; i < objectives; i++) {
     61        var f = i == 0 ? 1 : (Math.Sin(r[objectives - i - 1] * Math.PI / 2)) * (1 + g);
     62        for (var j = 0; j < objectives - i - 1; j++) {
    6363          f *= Math.Cos(r[j] * Math.PI / 2);
    6464        }
Note: See TracChangeset for help on using the changeset viewer.