Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/27/20 11:55:02 (4 years ago)
Author:
dpiringe
Message:

#3081

  • added static calculation method in:
    • ExponentialDiscreteDoubleValueModifier
    • GeneralizedExponentialDiscreteDoubleValueModifier
    • LinearDiscreteDoubleValueModifier
    • QuadraticDiscreteDoubleValueModifier
    • SquareRootDiscreteDoubleValueModifier
File:
1 edited

Legend:

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

    r17180 r17729  
    4141
    4242    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) {
    4347      double a = (endValue - startValue) / ((endIndex - startIndex) * (endIndex - startIndex));
    4448      return a * (index - startIndex) * (index - startIndex) + startValue;
Note: See TracChangeset for help on using the changeset viewer.