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/IntegerVectorCreator.cs

    r3054 r3059  
    3131  /// A base class for operators creating int-valued vectors.
    3232  /// </summary>
    33   [Item("IntVectorCreator", "A base class for operators creating int-valued vectors.")]
     33  [Item("IntegerVectorCreator", "A base class for operators creating int-valued vectors.")]
    3434  [StorableClass]
    35   public abstract class IntVectorCreator : SingleSuccessorOperator, IIntVectorCreator, IStochasticOperator {
     35  public abstract class IntegerVectorCreator : SingleSuccessorOperator, IIntegerVectorCreator, IStochasticOperator {
    3636    public ILookupParameter<IRandom> RandomParameter {
    3737      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3838    }
    39     public ILookupParameter<IntArray> IntVectorParameter {
    40       get { return (ILookupParameter<IntArray>)Parameters["IntVector"]; }
     39    public ILookupParameter<IntegerVector> IntegerVectorParameter {
     40      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
    4141    }
    4242    public IValueLookupParameter<IntValue> LengthParameter {
     
    5050    }
    5151
    52     protected IntVectorCreator()
     52    protected IntegerVectorCreator()
    5353      : base() {
    5454      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    55       Parameters.Add(new LookupParameter<IntArray>("IntVector", "The vector which should be manipulated."));
     55      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The vector which should be manipulated."));
    5656      Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector."));
    5757      Parameters.Add(new ValueLookupParameter<IntValue>("Minimum", "The lower bound for each element in the vector."));
     
    6060
    6161    public sealed override IOperation Apply() {
    62       IntVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, MinimumParameter.ActualValue, MaximumParameter.ActualValue);
     62      IntegerVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, MinimumParameter.ActualValue, MaximumParameter.ActualValue);
    6363      return base.Apply();
    6464    }
    6565
    66     protected abstract IntArray Create(IRandom random, IntValue length, IntValue minimum, IntValue maximum);
     66    protected abstract IntegerVector Create(IRandom random, IntValue length, IntValue minimum, IntValue maximum);
    6767  }
    6868}
Note: See TracChangeset for help on using the changeset viewer.