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/Moves/OneBitflipMove/StochasticOneBitflipMultiMoveGenerator.cs

    r11170 r11929  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    3031  [Item("StochasticOneBitflipMultiMoveGenerator", "Randomly samples n from all possible one bitflip moves from a given BinaryVector.")]
    3132  [StorableClass]
    32   public class StochasticOneBitflipMultiMoveGenerator : OneBitflipMoveGenerator, IMultiMoveGenerator {
     33  public class StochasticOneBitflipMultiMoveGenerator : OneBitflipMoveGenerator, IStochasticOperator, IMultiMoveGenerator {
    3334    public ILookupParameter<IRandom> RandomParameter {
    3435      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     
    6667    protected override OneBitflipMove[] GenerateMoves(BinaryVector binaryVector) {
    6768      IRandom random = RandomParameter.ActualValue;
     69      if (SampleSizeParameter.ActualValue == null) throw new InvalidOperationException("StochasticOneBitflipMultiMoveGenerator: Parameter " + SampleSizeParameter.ActualName + " could not be found.");
    6870      return Apply(binaryVector, random, SampleSizeParameter.ActualValue.Value);
    6971    }
Note: See TracChangeset for help on using the changeset viewer.