Changeset 12383


Ignore:
Timestamp:
05/05/15 12:46:38 (5 years ago)
Author:
mkommend
Message:

#2373: Merged r12333 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.BinaryVectorEncoding

  • stable/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Creators/RandomBinaryVectorCreator.cs

    r12009 r12383  
    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.