Changeset 16171 for branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/IHR/IHR6.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/IHR6.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 IHR6 : 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 res.Add(this.Evaluate(r, objectives)); 38 39 } 39 40 return res; 40 }41 42 protected override double GetBestKnownHypervolume(int objectives) {43 return Hypervolume.Calculate(GetOptimalParetoFront(objectives), GetReferencePoint(objectives), GetMaximization(objectives));44 41 } 45 42 … … 65 62 66 63 protected override double G(RealVector y) { 67 doublesum = 0.0;68 for ( inti = 1; i < y.Length; i++) {64 var sum = 0.0; 65 for (var i = 1; i < y.Length; i++) { 69 66 sum += HG(y[i]); 70 67 }
Note: See TracChangeset
for help on using the changeset viewer.