Changeset 17729 for trunk/HeuristicLab.Optimization.Operators/3.3/QuadraticDiscreteDoubleValueModifier.cs
- Timestamp:
- 08/27/20 11:55:02 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Optimization.Operators/3.3/QuadraticDiscreteDoubleValueModifier.cs
r17180 r17729 41 41 42 42 protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 43 return Calculate(value, startValue, endValue, index, startIndex, endIndex); 44 } 45 46 public static double Calculate(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 43 47 double a = (endValue - startValue) / ((endIndex - startIndex) * (endIndex - startIndex)); 44 48 return a * (index - startIndex) * (index - startIndex) + startValue;
Note: See TracChangeset
for help on using the changeset viewer.