Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 08:30:19 (10 years ago)
Author:
abeham
Message:

#2253: merged to stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs

    r11170 r11929  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    3940    /// Mmutation probability for each position.
    4041    /// </summary>
    41     public ValueLookupParameter<DoubleValue> MutationProbabilityParameter {
    42       get { return (ValueLookupParameter<DoubleValue>)Parameters["MutationProbability"]; }
     42    public IValueLookupParameter<DoubleValue> MutationProbabilityParameter {
     43      get { return (IValueLookupParameter<DoubleValue>)Parameters["MutationProbability"]; }
    4344    }
    4445
     
    7879    /// <param name="realVector">The vector of binary values to manipulate.</param>
    7980    protected override void Manipulate(IRandom random, BinaryVector binaryVector) {
    80       Apply(random, binaryVector, MutationProbabilityParameter.Value);
     81      if (MutationProbabilityParameter.ActualValue == null) throw new InvalidOperationException("SomePositionsBitflipManipulator: Parameter " + MutationProbabilityParameter.ActualName + " could not be found.");
     82      Apply(random, binaryVector, MutationProbabilityParameter.ActualValue);
    8183    }
    8284  }
Note: See TracChangeset for help on using the changeset viewer.