Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12333


Ignore:
Timestamp:
04/23/15 13:14:14 (9 years ago)
Author:
mkommend
Message:

#2373: Corrected typo in RandomBinaryVectorCreator by implementing an after-deserialization-hook.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Creators/RandomBinaryVectorCreator.cs

    r12012 r12333  
    3434  [StorableClass]
    3535  public sealed class RandomBinaryVectorCreator : BinaryVectorCreator {
    36     private const string TrueProbabilityParameterName = "TruePropability";
     36    private const string TrueProbabilityParameterName = "TrueProbability";
    3737
    3838    private IValueLookupParameter<DoubleValue> TrueProbabilityParameter {
     
    5959      #region Backwards compatible code, remove with 3.4
    6060      var defaultValue = 0.5;
    61       if (Parameters.ContainsKey(TrueProbabilityParameterName) && Parameters[TrueProbabilityParameterName] is IFixedValueParameter<DoubleValue>) {
    62         defaultValue = ((IFixedValueParameter<DoubleValue>)Parameters[TrueProbabilityParameterName]).Value.Value;
    63         Parameters.Remove(TrueProbabilityParameterName);
     61      const string parameterNameWithTypo = "TruePropability";
     62      if (Parameters.ContainsKey(parameterNameWithTypo) && Parameters[parameterNameWithTypo] is IValueParameter<DoubleValue>) {
     63        defaultValue = ((IValueParameter<DoubleValue>)Parameters[parameterNameWithTypo]).Value.Value;
     64        Parameters.Remove(parameterNameWithTypo);
    6465      }
    6566      if (!Parameters.ContainsKey(TrueProbabilityParameterName))
Note: See TracChangeset for help on using the changeset viewer.