Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/27/20 12:06:16 (4 years ago)
Author:
dpiringe
Message:

#3081

  • renamed method Calculate -> Apply
  • copied/added comments of the method Modify -> Apply
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs

    r17729 r17730  
    4343    }
    4444
     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
    4550    /// <summary>
    4651    /// Calculates a new value based on exponential decay or growth.
     
    5459    /// <param name="endIndex">The end index.</param>
    5560    /// <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) {
    6162      if (endValue <= 0 || startValue <= 0) throw new ArgumentException("startValue and endValue must be greater than 0.");
    6263      double b = Math.Pow(endValue / startValue, 1.0 / (endIndex - startIndex));
Note: See TracChangeset for help on using the changeset viewer.