Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3610


Ignore:
Timestamp:
05/04/10 20:03:19 (15 years ago)
Author:
abeham
Message:

fixed a bug in the DiscreteDoubleValueModifier #923

File:
1 edited

Legend:

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

    r3376 r3610  
    9797        int endIndex = EndIndexParameter.ActualValue.Value;
    9898        DoubleValue value = ValueParameter.ActualValue;
     99        if (value == null) {
     100          value = new DoubleValue();
     101          ValueParameter.ActualValue = value;
     102        }
    99103        double newValue = value.Value;
    100104        if (index == startIndex) {
     
    106110          newValue = Modify(value.Value, start, end, index, startIndex, endIndex);
    107111        }
    108         if (value == null) value = new DoubleValue(newValue);
    109         else value.Value = newValue;
     112        value.Value = newValue;
    110113      }
    111114      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.