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

    r15583 r16171  
    4747        throw new ArgumentException("The dimensionality of the problem(ProblemSize) must be larger than or equal to the number of objectives");
    4848      }
    49       double[] res = new double[objectives];
     49      var res = new double[objectives];
    5050
    5151      //calculate g(Xm)
    5252      double g = 0, length = length = r.Length - objectives + 1;
    53       for (int i = objectives; i < r.Length; i++) {
     53      for (var i = objectives; i < r.Length; i++) {
    5454        g += r[i];
    5555      }
     
    5858
    5959      //calculating f0...fM-2
    60       for (int i = 0; i < objectives - 1; i++) {
     60      for (var i = 0; i < objectives - 1; i++) {
    6161        res[i] = r[i];
    6262      }
    6363      //calculate fM-1
    6464      double h = objectives;
    65       for (int i = 0; i < objectives - 1; i++) {
     65      for (var i = 0; i < objectives - 1; i++) {
    6666        h -= res[i] / (1 + g) * (1 + Math.Sin(3 * Math.PI * res[i]));
    6767      }
Note: See TracChangeset for help on using the changeset viewer.