Changeset 16171 for branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/DTLZ/DTLZ7.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/DTLZ/DTLZ7.cs
r15583 r16171 47 47 throw new ArgumentException("The dimensionality of the problem(ProblemSize) must be larger than or equal to the number of objectives"); 48 48 } 49 double[]res = new double[objectives];49 var res = new double[objectives]; 50 50 51 51 //calculate g(Xm) 52 52 double g = 0, length = length = r.Length - objectives + 1; 53 for ( inti = objectives; i < r.Length; i++) {53 for (var i = objectives; i < r.Length; i++) { 54 54 g += r[i]; 55 55 } … … 58 58 59 59 //calculating f0...fM-2 60 for ( inti = 0; i < objectives - 1; i++) {60 for (var i = 0; i < objectives - 1; i++) { 61 61 res[i] = r[i]; 62 62 } 63 63 //calculate fM-1 64 64 double h = objectives; 65 for ( inti = 0; i < objectives - 1; i++) {65 for (var i = 0; i < objectives - 1; i++) { 66 66 h -= res[i] / (1 + g) * (1 + Math.Sin(3 * Math.PI * res[i])); 67 67 }
Note: See TracChangeset
for help on using the changeset viewer.