Changeset 11946 for branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs
- Timestamp:
- 02/06/15 14:15:10 (10 years ago)
- Location:
- branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding (added) merged: 11909
- Property svn:mergeinfo changed
-
branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs
r11171 r11946 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.