Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 14:15:10 (10 years ago)
Author:
mkommend
Message:

#2174: Merged trunk changes into programmable problem branch.

Location:
branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding

  • branches/ProgrammableProblem/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs

    r11171 r11946  
    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.