Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/16/10 10:35:28 (14 years ago)
Author:
svonolfe
Message:

Updated the IntegerVector project to use the new solution encodings (#909)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs

    r3053 r3059  
    3232  /// Uniformly distributed change of a single position of an integer vector.
    3333  /// </summary>
    34   /// It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.
    3534  /// <remarks>
    3635  /// It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.
     
    3837  [Item("UniformOnePositionManipulator", " Uniformly distributed change of a single position of an integer vector. It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.")]
    3938  [StorableClass]
    40   public class UniformOnePositionManipulator : IntVectorManipulator {
     39  public class UniformOnePositionManipulator : IntegerVectorManipulator {
    4140    /// <summary>
    4241    /// The lower bound of the values in the int vector.
     
    7069    /// <param name="max">The maximum value of the sampling range for
    7170    /// the vector element to change (exclusive).</param>
    72     public static void Apply(IRandom random, IntArray vector, IntValue min, IntValue max) {
     71    public static void Apply(IRandom random, IntegerVector vector, IntValue min, IntValue max) {
    7372      int index = random.Next(vector.Length);
    7473      vector[index] = random.Next(min.Value, max.Value);
     
    8180    /// <param name="random">A random number generator.</param>
    8281    /// <param name="vector">The integer vector to manipulate.</param>
    83     protected override void Manipulate(IRandom random, IntArray vector) {
     82    protected override void Manipulate(IRandom random, IntegerVector vector) {
    8483      if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found.");
    8584      if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MaximumParameter.ActualName + " could not be found.");
Note: See TracChangeset for help on using the changeset viewer.