Changeset 16171 for branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/IHR/IHR3.cs
- Timestamp:
- 09/21/18 09:18:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/IHR/IHR3.cs
r15583 r16171 21 21 using System; 22 22 using System.Collections.Generic; 23 using System.Linq; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; … … 31 32 public class IHR3 : IHR { 32 33 protected override IEnumerable<double[]> GetOptimalParetoFront(int objectives) { 33 List<double[]>res = new List<double[]>();34 for ( inti = 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); 36 37 r[0] = 1 / 500.0 * i; 37 38 … … 39 40 } 40 41 return res; 41 }42 43 protected override double GetBestKnownHypervolume(int objectives) {44 return Hypervolume.Calculate(GetOptimalParetoFront(objectives), GetReferencePoint(objectives), GetMaximization(objectives));45 42 } 46 43 … … 66 63 67 64 protected override double G(RealVector y) { 68 doublesum = 0.0;69 for ( inti = 1; i < y.Length; i++) {65 var sum = 0.0; 66 for (var i = 1; i < y.Length; i++) { 70 67 sum += HG(y[i]); 71 68 }
Note: See TracChangeset
for help on using the changeset viewer.