Changeset 3781 for trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs
- Timestamp:
- 05/11/10 19:18:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs
r3376 r3781 65 65 } 66 66 67 public override RealVector GetBestKnownSolution(int dimension) { 68 if (dimension < 2) throw new ArgumentException(Name + ": This function is not defined for 1 dimension."); 69 RealVector result = new RealVector(dimension); 70 for (int i = 0; i < dimension; i++) result[i] = 1; 71 return result; 72 } 67 73 /// <summary> 68 74 /// Evaluates the test function for a specific <paramref name="point"/>. … … 80 86 81 87 s = Math.Sin(Math.PI * z[0]); 88 if (Math.Abs(s) < 1e-15) s = 0; // Math.Sin(Math.PI) == 0.00000000000000012246063538223773 82 89 s *= s; 83 90
Note: See TracChangeset
for help on using the changeset viewer.