Changeset 17730 for trunk/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs
- Timestamp:
- 08/27/20 12:06:16 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs
r17729 r17730 43 43 } 44 44 45 46 protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 47 return Apply(value, startValue, endValue, index, startIndex, endIndex); 48 } 49 45 50 /// <summary> 46 51 /// Calculates a new value based on exponential decay or growth. … … 54 59 /// <param name="endIndex">The end index.</param> 55 60 /// <returns>The new value.</returns> 56 protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 57 return Calculate(value, startValue, endValue, index, startIndex, endIndex); 58 } 59 60 public static double Calculate(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 61 public static double Apply(double value, double startValue, double endValue, int index, int startIndex, int endIndex) { 61 62 if (endValue <= 0 || startValue <= 0) throw new ArgumentException("startValue and endValue must be greater than 0."); 62 63 double b = Math.Pow(endValue / startValue, 1.0 / (endIndex - startIndex));
Note: See TracChangeset
for help on using the changeset viewer.