- Timestamp:
- 02/05/15 11:09:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs
r11171 r11909 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 39 40 /// Mmutation probability for each position. 40 41 /// </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"]; } 43 44 } 44 45 … … 78 79 /// <param name="realVector">The vector of binary values to manipulate.</param> 79 80 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); 81 83 } 82 84 }
Note: See TracChangeset
for help on using the changeset viewer.