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 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs

    r3054 r3059  
    3131  /// Generates a new random integer vector with each element uniformly distributed in a specified range.
    3232  /// </summary>
    33   [Item("UniformRandomIntVectorCreator", "An operator which creates a new random int vector with each element uniformly distributed in a specified range.")]
     33  [Item("UniformRandomIntegerVectorCreator", "An operator which creates a new random int vector with each element uniformly distributed in a specified range.")]
    3434  [StorableClass]
    3535  [Creatable("Test")]
    36   public class UniformRandomIntVectorCreator : IntVectorCreator {
     36  public class UniformRandomIntegerVectorCreator : IntegerVectorCreator {
    3737    /// <summary>
    3838    /// Generates a new random integer vector with the given <paramref name="length"/>.
     
    4343    /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param>
    4444    /// <returns>The newly created integer vector.</returns>
    45     public static IntArray Apply(IRandom random, int length, int min, int max) {
     45    public static IntegerVector Apply(IRandom random, int length, int min, int max) {
    4646      int[] result = new int[length];
    4747      for (int i = 0; i < length; i++)
    4848        result[i] = random.Next(min, max);
    49       return new IntArray(result);
     49      return new IntegerVector(result);
    5050    }
    5151
     
    5858    /// <param name="maximum">The maximum value of the sampling range for each vector element (exclusive).</param>
    5959    /// <returns>The newly created int vector.</returns>
    60     protected override IntArray Create(IRandom random, IntValue length, IntValue minimum, IntValue maximum) {
     60    protected override IntegerVector Create(IRandom random, IntValue length, IntValue minimum, IntValue maximum) {
    6161      return Apply(random, length.Value, minimum.Value, maximum.Value);
    6262    }
Note: See TracChangeset for help on using the changeset viewer.