Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/10 23:49:54 (15 years ago)
Author:
swagner
Message:

Renamed classes of HeuristicLab.Data (#909)

Location:
trunk/sources/HeuristicLab.Encodings.RealVector/3.3
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/BoundsChecker.cs

    r3017 r3048  
    3535  [StorableClass]
    3636  public class BoundsChecker : SingleSuccessorOperator {
    37     public LookupParameter<DoubleArrayData> RealVectorParameter {
    38       get { return (LookupParameter<DoubleArrayData>)Parameters["RealVector"]; }
     37    public LookupParameter<DoubleArray> RealVectorParameter {
     38      get { return (LookupParameter<DoubleArray>)Parameters["RealVector"]; }
    3939    }
    40     public ValueLookupParameter<DoubleData> MinimumParameter {
    41       get { return (ValueLookupParameter<DoubleData>)Parameters["Minimum"]; }
     40    public ValueLookupParameter<DoubleValue> MinimumParameter {
     41      get { return (ValueLookupParameter<DoubleValue>)Parameters["Minimum"]; }
    4242    }
    43     public ValueLookupParameter<DoubleData> MaximumParameter {
    44       get { return (ValueLookupParameter<DoubleData>)Parameters["Maximum"]; }
     43    public ValueLookupParameter<DoubleValue> MaximumParameter {
     44      get { return (ValueLookupParameter<DoubleValue>)Parameters["Maximum"]; }
    4545    }
    4646
     
    5151    public BoundsChecker()
    5252      : base() {
    53       Parameters.Add(new LookupParameter<DoubleArrayData>("RealVector", "The real-valued vector for which the bounds should be checked."));
    54       Parameters.Add(new ValueLookupParameter<DoubleData>("Minimum", "The lower bound for each element in the vector."));
    55       Parameters.Add(new ValueLookupParameter<DoubleData>("Maximum", "The upper bound for each element in the vector."));
     53      Parameters.Add(new LookupParameter<DoubleArray>("RealVector", "The real-valued vector for which the bounds should be checked."));
     54      Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "The lower bound for each element in the vector."));
     55      Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "The upper bound for each element in the vector."));
    5656    }
    5757
     
    6464    /// <param name="vector">The vector to check.</param>
    6565    /// <returns>The corrected real vector.</returns>
    66     public static void Apply(DoubleArrayData vector, DoubleData min, DoubleData max) {
     66    public static void Apply(DoubleArray vector, DoubleValue min, DoubleValue max) {
    6767      for (int i = 0; i < vector.Length; i++) {
    6868        if (vector[i] < min.Value) vector[i] = min.Value;
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Creators/UniformRandomRealVectorCreator.cs

    r3017 r3048  
    5151    /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param>
    5252    /// <returns>The newly created real vector.</returns>
    53     public static DoubleArrayData Apply(IRandom random, int length, double min, double max) {
     53    public static DoubleArray Apply(IRandom random, int length, double min, double max) {
    5454      if (length <= 0) throw new ArgumentException("UniformRandomRealVectorCreator: Length is smaller or equal to 0.", "length");
    5555      if (min > max) throw new ArgumentException("UniformRandomRealVectorCreator: Minimum is greater than Maximum.", "min");
    56       DoubleArrayData result = new DoubleArrayData(length);
     56      DoubleArray result = new DoubleArray(length);
    5757      for (int i = 0; i < length; i++)
    5858        result[i] = min + random.NextDouble() * (max - min);
     
    6868    /// <param name="maximum">The maximum value of the sampling range for each vector element (exclusive).</param>
    6969    /// <returns>The newly created real vector.</returns>
    70     protected override DoubleArrayData Create(IRandom random, IntData length, DoubleData minimum, DoubleData maximum) {
     70    protected override DoubleArray Create(IRandom random, IntValue length, DoubleValue minimum, DoubleValue maximum) {
    7171      return Apply(random, length.Value, minimum.Value, maximum.Value);
    7272    }
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/AverageCrossover.cs

    r3017 r3048  
    4545    /// <param name="parents">The list of parents.</param>
    4646    /// <returns>The child vector (average) of the parents.</returns>
    47     public static DoubleArrayData Apply(IRandom random, ItemArray<DoubleArrayData> parents) {
     47    public static DoubleArray Apply(IRandom random, ItemArray<DoubleArray> parents) {
    4848      int length = parents[0].Length, parentsCount = parents.Length;
    4949      if (parents.Length < 2) throw new ArgumentException("AverageCrossover: The number of parents is less than 2.", "parents");
    50       DoubleArrayData result = new DoubleArrayData(length);
     50      DoubleArray result = new DoubleArray(length);
    5151      try {
    5252        double avg;
     
    6565
    6666    /// <summary>
    67     /// Forwards the call to <see cref="Apply(IRandom, ItemArray<DoubleArrayData>)"/>.
     67    /// Forwards the call to <see cref="Apply(IRandom, ItemArray<DoubleArray>)"/>.
    6868    /// </summary>
    6969    /// <param name="random">The random number generator.</param>
    7070    /// <param name="parents">The list of parents.</param>
    7171    /// <returns>The child vector (average) of the parents.</returns>
    72     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     72    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    7373      return Apply(random, parents);
    7474    }
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/BlendAlphaBetaCrossover.cs

    r3017 r3048  
    4343    /// Whether the problem is a maximization or minimization problem.
    4444    /// </summary>
    45     public ValueLookupParameter<BoolData> MaximizationParameter {
    46       get { return (ValueLookupParameter<BoolData>)Parameters["Maximization"]; }
     45    public ValueLookupParameter<BoolValue> MaximizationParameter {
     46      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
    4747    }
    4848    /// <summary>
    4949    /// The quality of the parents.
    5050    /// </summary>
    51     public SubScopesLookupParameter<DoubleData> QualityParameter {
    52       get { return (SubScopesLookupParameter<DoubleData>)Parameters["Quality"]; }
     51    public SubScopesLookupParameter<DoubleValue> QualityParameter {
     52      get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
    5353    }
    5454    /// <summary>
    5555    /// The alpha parameter specifies how much the interval between the parents should be extended in direction of the better parent.
    5656    /// </summary>
    57     public ValueLookupParameter<DoubleData> AlphaParameter {
    58       get { return (ValueLookupParameter<DoubleData>)Parameters["Alpha"]; }
     57    public ValueLookupParameter<DoubleValue> AlphaParameter {
     58      get { return (ValueLookupParameter<DoubleValue>)Parameters["Alpha"]; }
    5959    }
    6060    /// <summary>
    6161    /// The beta parameter specifies how much the interval between the parents should be extended in direction of the worse parent.
    6262    /// </summary>
    63     public ValueLookupParameter<DoubleData> BetaParameter {
    64       get { return (ValueLookupParameter<DoubleData>)Parameters["Beta"]; }
     63    public ValueLookupParameter<DoubleValue> BetaParameter {
     64      get { return (ValueLookupParameter<DoubleValue>)Parameters["Beta"]; }
    6565    }
    6666
     
    7171    public BlendAlphaBetaCrossover()
    7272      : base() {
    73       Parameters.Add(new ValueLookupParameter<BoolData>("Maximization", "Whether the problem is a maximization problem or not."));
    74       Parameters.Add(new SubScopesLookupParameter<DoubleData>("Quality", "The quality values of the parents."));
    75       Parameters.Add(new ValueLookupParameter<DoubleData>("Alpha", "The value for alpha.", new DoubleData(0.75)));
    76       Parameters.Add(new ValueLookupParameter<DoubleData>("Beta", "The value for beta.", new DoubleData(0.25)));
     73      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "Whether the problem is a maximization problem or not."));
     74      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The quality values of the parents."));
     75      Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The value for alpha.", new DoubleValue(0.75)));
     76      Parameters.Add(new ValueLookupParameter<DoubleValue>("Beta", "The value for beta.", new DoubleValue(0.25)));
    7777    }
    7878
     
    9494    /// <param name="beta">The parameter beta.</param>
    9595    /// <returns>The real vector that results from the crossover.</returns>
    96     public static DoubleArrayData Apply(IRandom random, DoubleArrayData betterParent, DoubleArrayData worseParent, DoubleData alpha, DoubleData beta) {
     96    public static DoubleArray Apply(IRandom random, DoubleArray betterParent, DoubleArray worseParent, DoubleValue alpha, DoubleValue beta) {
    9797      if (betterParent.Length != worseParent.Length) throw new ArgumentException("BlendAlphaBetaCrossover: The parents' vectors are of different length.", "betterParent");
    9898      if (alpha.Value < 0) throw new ArgumentException("BlendAlphaBetaCrossover: Parameter alpha must be greater or equal to 0.", "alpha");
     
    100100      int length = betterParent.Length;
    101101      double min, max, d;
    102       DoubleArrayData result = new DoubleArrayData(length);
     102      DoubleArray result = new DoubleArray(length);
    103103
    104104      for (int i = 0; i < length; i++) {
     
    117117
    118118    /// <summary>
    119     /// Checks if the number of parents is equal to 2, if all parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrayData, DoubleData, DoubleData)"/>.
     119    /// Checks if the number of parents is equal to 2, if all parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArray, DoubleValue, DoubleValue)"/>.
    120120    /// </summary>
    121121    /// <exception cref="ArgumentException">Thrown when the number of parents is not equal to 2.</exception>
     
    132132    /// <param name="parents">The collection of parents (must be of size 2).</param>
    133133    /// <returns>The real vector that results from the crossover.</returns>
    134     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     134    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    135135      if (parents.Length != 2) throw new ArgumentException("BlendAlphaBetaCrossover: Number of parents is not equal to 2.", "parents");
    136136      if (MaximizationParameter.ActualValue == null) throw new InvalidOperationException("BlendAlphaBetaCrossover: Parameter " + MaximizationParameter.ActualName + " could not be found.");
     
    138138      if (AlphaParameter.ActualValue == null || BetaParameter.ActualValue == null) throw new InvalidOperationException("BlendAlphaBetaCrossover: Parameter " + AlphaParameter.ActualName + " or paramter " + BetaParameter.ActualName + " could not be found.");
    139139     
    140       ItemArray<DoubleData> qualities = QualityParameter.ActualValue;
     140      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
    141141      bool maximization = MaximizationParameter.ActualValue.Value;
    142142      // the better parent
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/BlendAlphaCrossover.cs

    r3017 r3048  
    4545    /// values left and right of the min and max value for each gene.
    4646    /// </summary>
    47     public ValueLookupParameter<DoubleData> AlphaParameter {
    48       get { return (ValueLookupParameter<DoubleData>)Parameters["Alpha"]; }
     47    public ValueLookupParameter<DoubleValue> AlphaParameter {
     48      get { return (ValueLookupParameter<DoubleValue>)Parameters["Alpha"]; }
    4949    }
    5050    /// <summary>
     
    5353    public BlendAlphaCrossover()
    5454      : base() {
    55       Parameters.Add(new ValueLookupParameter<DoubleData>("Alpha", "Value for alpha", new DoubleData(0.5)));
     55      Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "Value for alpha", new DoubleValue(0.5)));
    5656    }
    5757
     
    7070    /// <param name="alpha">The alpha value for the crossover.</param>
    7171    /// <returns>The newly created real vector resulting from the crossover operation.</returns>
    72     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2, DoubleData alpha) {
     72    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2, DoubleValue alpha) {
    7373      if (parent1.Length != parent2.Length) throw new ArgumentException("BlendAlphaCrossover: The parents' vectors are of different length.", "parent1");
    7474      if (alpha.Value < 0) throw new ArgumentException("BlendAlphaCrossover: Paramter alpha must be greater or equal than 0.", "alpha");
    7575      int length = parent1.Length;
    76       DoubleArrayData result = new DoubleArrayData(length);
     76      DoubleArray result = new DoubleArray(length);
    7777      double max = 0, min = 0, d = 0, resMin = 0, resMax = 0;
    7878
     
    9090
    9191    /// <summary>
    92     /// Checks that the number of parents is equal to 2 and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrayData, DoubleData)"/>.
     92    /// Checks that the number of parents is equal to 2 and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArray, DoubleValue)"/>.
    9393    /// </summary>
    9494    /// <exception cref="ArgumentException">Thrown when the number of parents is not equal to 2.</exception>
     
    9797    /// <param name="parents">The collection of parents (must be of size 2).</param>
    9898    /// <returns>The real vector resulting from the crossover operation.</returns>
    99     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     99    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    100100      if (parents.Length != 2) throw new ArgumentException("BlendAlphaCrossover: The number of parents is not equal to 2", "parents");
    101101      if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("BlendAlphaCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/DiscreteCrossover.cs

    r3017 r3048  
    4545    /// <param name="parents">An array containing the parents that should be crossed.</param>
    4646    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    47     public static DoubleArrayData Apply(IRandom random, ItemArray<DoubleArrayData> parents) {
     47    public static DoubleArray Apply(IRandom random, ItemArray<DoubleArray> parents) {
    4848      int length = parents[0].Length;
    4949     
     
    5353      }
    5454     
    55       DoubleArrayData result = new DoubleArrayData(length);
     55      DoubleArray result = new DoubleArray(length);
    5656      for (int i = 0; i < length; i++) {
    5757        result[i] = parents[random.Next(parents.Length)][i];
     
    6262
    6363    /// <summary>
    64     /// Checks number of parents and forwards the call to <see cref="Apply(IRandom, ItemArray<DoubleArrayData>)"/>.
     64    /// Checks number of parents and forwards the call to <see cref="Apply(IRandom, ItemArray<DoubleArray>)"/>.
    6565    /// </summary>
    6666    /// <exception cref="ArgumentException">Thrown when <paramref name="parents"/> contains less than 2 elements.</exception>
     
    6868    /// <param name="parents">The collection of parents (must be of size 2 or greater).</param>
    6969    /// <returns>The real vector resulting from the crossover.</returns>
    70     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     70    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    7171      if (parents.Length < 2) throw new ArgumentException("DiscreteCrossover: The number of parents is less than 2.", "parents");
    7272      return Apply(random, parents);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/HeuristicCrossover.cs

    r3017 r3048  
    4040    /// Whether the problem is a maximization or minimization problem.
    4141    /// </summary>
    42     public ValueLookupParameter<BoolData> MaximizationParameter {
    43       get { return (ValueLookupParameter<BoolData>)Parameters["Maximization"]; }
     42    public ValueLookupParameter<BoolValue> MaximizationParameter {
     43      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
    4444    }
    4545    /// <summary>
    4646    /// The quality of the parents.
    4747    /// </summary>
    48     public SubScopesLookupParameter<DoubleData> QualityParameter {
    49       get { return (SubScopesLookupParameter<DoubleData>)Parameters["Quality"]; }
     48    public SubScopesLookupParameter<DoubleValue> QualityParameter {
     49      get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
    5050    }
    5151
     
    5656    public HeuristicCrossover()
    5757      : base() {
    58       Parameters.Add(new ValueLookupParameter<BoolData>("Maximization", "Whether the problem is a maximization problem or not."));
    59       Parameters.Add(new SubScopesLookupParameter<DoubleData>("Quality", "The quality values of the parents."));
     58      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "Whether the problem is a maximization problem or not."));
     59      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The quality values of the parents."));
    6060    }
    6161
     
    6868    /// <param name="worseParent">The second parent for the crossover operation.</param>
    6969    /// <returns>The newly created real vector, resulting from the heuristic crossover.</returns>
    70     public static DoubleArrayData Apply(IRandom random, DoubleArrayData betterParent, DoubleArrayData worseParent) {
     70    public static DoubleArray Apply(IRandom random, DoubleArray betterParent, DoubleArray worseParent) {
    7171      if (betterParent.Length != worseParent.Length)
    7272        throw new ArgumentException("HeuristicCrossover: the two parents are not of the same length");
     
    7979        result[i] = betterParent[i] + factor * (betterParent[i] - worseParent[i]);
    8080      }
    81       return new DoubleArrayData(result);
     81      return new DoubleArray(result);
    8282    }
    8383
     
    9696    /// <param name="parents">An array containing the two real vectors that should be crossed.</param>
    9797    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    98     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     98    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    9999      if (parents.Length != 2) throw new ArgumentException("HeuristicCrossover: The number of parents is not equal to 2");
    100100
     
    102102      if (QualityParameter.ActualValue == null || QualityParameter.ActualValue.Length != parents.Length) throw new InvalidOperationException("HeuristicCrossover: Parameter " + QualityParameter.ActualName + " could not be found, or not in the same quantity as there are parents.");
    103103
    104       ItemArray<DoubleData> qualities = QualityParameter.ActualValue;
     104      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
    105105      bool maximization = MaximizationParameter.ActualValue.Value;
    106106
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/LocalCrossover.cs

    r3017 r3048  
    4343    /// <param name="parent2">The second parent for the crossover operation.</param>
    4444    /// <returns>The newly created real vector, resulting from the local crossover.</returns>
    45     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2) {
     45    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2) {
    4646      if (parent1.Length != parent2.Length)
    4747        throw new ArgumentException("LocalCrossover: the two parents are not of the same length");
     
    5555        result[i] = (factor * parent1[i]) + ((1 - factor) * parent2[i]);
    5656      }
    57       return new DoubleArrayData(result);
     57      return new DoubleArray(result);
    5858    }
    5959
     
    6565    /// <param name="parents">An array containing the two real vectors that should be crossed.</param>
    6666    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    67     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     67    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    6868      if (parents.Length != 2) throw new ArgumentException("LocalCrossover: The number of parents is not equal to 2");
    6969      return Apply(random, parents[0], parents[1]);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/RandomConvexCrossover.cs

    r3017 r3048  
    4343    /// <param name="parent2">The second parent vector for the crossover.</param>
    4444    /// <returns>The newly created real vector, resulting from the random convex crossover.</returns>
    45     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2) {
     45    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2) {
    4646      if (parent1.Length != parent2.Length)
    4747        throw new ArgumentException("ERROR in RandomConvexCrossover: the two parents are not of the same length");
     
    5353      for (int i = 0; i < length; i++)
    5454        result[i] = (factor * parent1[i]) + ((1 - factor) * parent2[i]);
    55       return new DoubleArrayData(result);
     55      return new DoubleArray(result);
    5656    }
    5757
     
    6363    /// <param name="parents">An array containing the two real vectors that should be crossed.</param>
    6464    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    65     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     65    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    6666      if (parents.Length != 2) throw new ArgumentException("ERROR in RandomConvexCrossover: The number of parents is not equal to 2");
    6767      return Apply(random, parents[0], parents[1]);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/SimulatedBinaryCrossover.cs

    r3017 r3048  
    4040    /// The parameter must be greater or equal than 0. Common values are in the range [0;5] and more often just [2;5].
    4141    /// </summary>
    42     public ValueLookupParameter<DoubleData> ContiguityParameter {
    43       get { return (ValueLookupParameter<DoubleData>)Parameters["Contiguity"]; }
     42    public ValueLookupParameter<DoubleValue> ContiguityParameter {
     43      get { return (ValueLookupParameter<DoubleValue>)Parameters["Contiguity"]; }
    4444    }
    4545
     
    5050    public SimulatedBinaryCrossover()
    5151      : base() {
    52       Parameters.Add(new ValueLookupParameter<DoubleData>("Contiguity", "Specifies whether the crossover should produce very different (small value) or very similar (large value) children. Valid values must be greater or equal to 0.", new DoubleData(2)));
     52      Parameters.Add(new ValueLookupParameter<DoubleValue>("Contiguity", "Specifies whether the crossover should produce very different (small value) or very similar (large value) children. Valid values must be greater or equal to 0.", new DoubleValue(2)));
    5353    }
    5454
     
    6666    /// <param name="contiguity">The contiguity value that specifies how close a child should be to its parents (larger value means closer). The value must be greater or equal than 0. Typical values are in the range [2;5].</param>
    6767    /// <returns>The vector resulting from the crossover.</returns>
    68     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2, DoubleData contiguity) {
     68    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2, DoubleValue contiguity) {
    6969      if (parent1.Length != parent2.Length) throw new ArgumentException("SimulatedBinaryCrossover: Parents are of unequal length");
    7070      if (contiguity.Value < 0) throw new ArgumentException("SimulatedBinaryCrossover: Contiguity value is smaller than 0", "contiguity");
    7171      int length = parent1.Length;
    72       DoubleArrayData result = new DoubleArrayData(length);
     72      DoubleArray result = new DoubleArray(length);
    7373      for (int i = 0; i < length; i++) {
    7474        if (length == 1 || random.NextDouble() < 0.5) { // cross this variable
     
    9292
    9393    /// <summary>
    94     /// Checks number of parents, availability of the parameters and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrayData, DoubleData)"/>.
     94    /// Checks number of parents, availability of the parameters and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArray, DoubleValue)"/>.
    9595    /// </summary>
    9696    /// <exception cref="ArgumentException">Thrown when there are not exactly 2 parents or when the contiguity parameter could not be found.</exception>
     
    9898    /// <param name="parents">The collection of parents (must be of size 2).</param>
    9999    /// <returns>The real vector resulting from the crossover.</returns>
    100     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     100    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    101101      if (parents.Length != 2) throw new ArgumentException("SimulatedBinaryCrossover: The number of parents is not equal to 2");
    102102      if (ContiguityParameter.ActualValue == null) throw new InvalidOperationException("SimulatedBinaryCrossover: Parameter " + ContiguityParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/SinglePointCrossover.cs

    r3017 r3048  
    4646    /// <param name="parent2">The second parent for crossover.</param>
    4747    /// <returns>The newly created real vector, resulting from the single point crossover.</returns>
    48     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2) {
     48    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2) {
    4949      if (parent1.Length != parent2.Length) throw new ArgumentException("SinglePointCrossover: Parents are of unequal length");
    5050      int length = parent1.Length;
    51       DoubleArrayData result = new DoubleArrayData(length);
     51      DoubleArray result = new DoubleArray(length);
    5252      int breakPoint = random.Next(1, length - 1);
    5353
     
    6161
    6262    /// <summary>
    63     /// Checks number of parents and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrayData)"/>.
     63    /// Checks number of parents and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArray)"/>.
    6464    /// </summary>
    6565    /// <exception cref="ArgumentException">Thrown when the parents' vectors are of unequal length or when <paramref name="contiguity"/> is smaller than 0.</exception>
     
    6767    /// <param name="parents">The list of parents.</param>
    6868    /// <returns>A new real vector.</returns>
    69     protected override HeuristicLab.Data.DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     69    protected override HeuristicLab.Data.DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    7070      if (parents.Length != 2) throw new ArgumentException("SinglePointCrossover: The number of parents is not equal to 2");
    7171      return Apply(random, parents[0], parents[1]);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/UniformAllPositionsArithmeticCrossover.cs

    r3017 r3048  
    4040    /// The alpha parameter needs to be in the interval [0;1] and specifies how close the resulting offspring should be either to parent1 (alpha -> 0) or parent2 (alpha -> 1).
    4141    /// </summary>
    42     public ValueLookupParameter<DoubleData> AlphaParameter {
    43       get { return (ValueLookupParameter<DoubleData>)Parameters["Alpha"]; }
     42    public ValueLookupParameter<DoubleValue> AlphaParameter {
     43      get { return (ValueLookupParameter<DoubleValue>)Parameters["Alpha"]; }
    4444    }
    4545
     
    4949    public UniformAllPositionsArithmeticCrossover()
    5050      : base() {
    51       Parameters.Add(new ValueLookupParameter<DoubleData>("Alpha", "The alpha value in the range [0;1]", new DoubleData(0.33)));
     51      Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The alpha value in the range [0;1]", new DoubleValue(0.33)));
    5252    }
    5353
     
    6161    /// <param name="alpha">The alpha parameter (<see cref="AlphaParameter"/>).</param>
    6262    /// <returns>The vector resulting from the crossover.</returns>
    63     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2, DoubleData alpha) {
     63    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2, DoubleValue alpha) {
    6464      int length = parent1.Length;
    6565      if (length != parent2.Length) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: The parent vectors are of different length.", "parent1");
    6666      if (alpha.Value < 0 || alpha.Value > 1) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: Parameter alpha must be in the range [0;1]", "alpha");
    67       DoubleArrayData result = new DoubleArrayData(length);
     67      DoubleArray result = new DoubleArray(length);
    6868      for (int i = 0; i < length; i++) {
    6969        result[i] = alpha.Value * parent1[i] + (1 - alpha.Value) * parent2[i];
     
    7373
    7474    /// <summary>
    75     /// Checks that there are exactly 2 parents, that the alpha parameter is not null and fowards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrrayData, DoubleData)"/>.
     75    /// Checks that there are exactly 2 parents, that the alpha parameter is not null and fowards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArrrayData, DoubleValue)"/>.
    7676    /// </summary>
    7777    /// <exception cref="ArgumentException">Thrown when there are not exactly two parents.</exception>
     
    8080    /// <param name="parents">The collection of parents (must be of size 2).</param>
    8181    /// <returns>The vector resulting from the crossover.</returns>
    82     protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     82    protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) {
    8383      if (parents.Length != 2) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: There must be exactly two parents.", "parents");
    8484      if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformAllPositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs

    r3017 r3048  
    4040    /// The alpha parameter needs to be in the interval [0;1] and specifies how close the resulting offspring should be either to parent1 (alpha -> 0) or parent2 (alpha -> 1).
    4141    /// </summary>
    42     public ValueLookupParameter<DoubleData> AlphaParameter {
    43       get { return (ValueLookupParameter<DoubleData>)Parameters["Alpha"]; }
     42    public ValueLookupParameter<DoubleValue> AlphaParameter {
     43      get { return (ValueLookupParameter<DoubleValue>)Parameters["Alpha"]; }
    4444    }
    4545    /// <summary>
    4646    /// The probability in the range [0;1] for each position in the vector to be crossed.
    4747    /// </summary>
    48     public ValueLookupParameter<DoubleData> ProbabilityParameter {
    49       get { return (ValueLookupParameter<DoubleData>)Parameters["Probability"]; }
     48    public ValueLookupParameter<DoubleValue> ProbabilityParameter {
     49      get { return (ValueLookupParameter<DoubleValue>)Parameters["Probability"]; }
    5050    }
    5151
     
    5555    public UniformSomePositionsArithmeticCrossover()
    5656      : base() {
    57       Parameters.Add(new ValueLookupParameter<DoubleData>("Alpha", "The alpha value in the range [0;1]", new DoubleData(0.5)));
    58       Parameters.Add(new ValueLookupParameter<DoubleData>("Probability", "The probability for crossing a position in the range [0;1]", new DoubleData(0.5)));
     57      Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The alpha value in the range [0;1]", new DoubleValue(0.5)));
     58      Parameters.Add(new ValueLookupParameter<DoubleValue>("Probability", "The probability for crossing a position in the range [0;1]", new DoubleValue(0.5)));
    5959    }
    6060
     
    6868    /// <param name="probability">The probability parameter (<see cref="ProbabilityParameter"/>).</param>
    6969    /// <returns>The vector resulting from the crossover.</returns>
    70     public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2, DoubleData alpha, DoubleData probability) {
     70    public static DoubleArray Apply(IRandom random, DoubleArray parent1, DoubleArray parent2, DoubleValue alpha, DoubleValue probability) {
    7171      int length = parent1.Length;
    7272      if (length != parent2.Length) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: The parent vectors are of different length.", "parent1");
     
    7474      if (probability.Value < 0 || probability.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter probability must be in the range [0;1]", "probability");
    7575     
    76       DoubleArrayData result = new DoubleArrayData(length);
     76      DoubleArray result = new DoubleArray(length);
    7777      for (int i = 0; i < length; i++) {
    7878        if (random.NextDouble() < probability.Value)
     
    8484
    8585    /// <summary>
    86     /// Checks that there are exactly 2 parents, that the alpha and the probability parameter are not null and fowards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrrayData, DoubleData)"/>.
     86    /// Checks that there are exactly 2 parents, that the alpha and the probability parameter are not null and fowards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArrrayData, DoubleValue)"/>.
    8787    /// </summary>
    8888    /// <exception cref="ArgumentException">Thrown when there are not exactly two parents.</exception>
     
    9191    /// <param name="parents">The collection of parents (must be of size 2).</param>
    9292    /// <returns>The vector resulting from the crossover.</returns>
    93     protected override DoubleArrayData  Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
     93    protected override DoubleArray  Cross(IRandom random, ItemArray<DoubleArray> parents) {
    9494      if (parents.Length != 2) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: There must be exactly two parents.", "parents");
    9595      if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformSomePositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Interfaces/IRealVectorCreator.cs

    r2900 r3048  
    2929  /// </summary>
    3030  public interface IRealVectorCreator : IRealVectorOperator, ISolutionCreator {
    31     IValueLookupParameter<IntData> LengthParameter { get; }
    32     IValueLookupParameter<DoubleData> MinimumParameter { get; }
    33     IValueLookupParameter<DoubleData> MaximumParameter { get; }
    34     ILookupParameter<DoubleArrayData> RealVectorParameter { get; }
     31    IValueLookupParameter<IntValue> LengthParameter { get; }
     32    IValueLookupParameter<DoubleValue> MinimumParameter { get; }
     33    IValueLookupParameter<DoubleValue> MaximumParameter { get; }
     34    ILookupParameter<DoubleArray> RealVectorParameter { get; }
    3535  }
    3636}
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Interfaces/IRealVectorCrossover.cs

    r2900 r3048  
    2929  /// </summary>
    3030  public interface IRealVectorCrossover : IRealVectorOperator, ICrossover {
    31     ILookupParameter<ItemArray<DoubleArrayData>> ParentsParameter { get; }
    32     ILookupParameter<DoubleArrayData> ChildParameter { get; }
     31    ILookupParameter<ItemArray<DoubleArray>> ParentsParameter { get; }
     32    ILookupParameter<DoubleArray> ChildParameter { get; }
    3333  }
    3434}
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Interfaces/IRealVectorManipulator.cs

    r2900 r3048  
    2929  /// </summary>
    3030  public interface IRealVectorManipulator : IRealVectorOperator, IManipulator {
    31     ILookupParameter<DoubleArrayData> RealVectorParameter { get; }
     31    ILookupParameter<DoubleArray> RealVectorParameter { get; }
    3232  }
    3333}
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/BreederGeneticAlgorithmManipulator.cs

    r3026 r3048  
    3838  public class BreederGeneticAlgorithmManipulator : RealVectorManipulator {
    3939    private static readonly double[] powerOfTwo = new double[] { 1, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625, 0.0078125, 0.00390625, 0.001953125, 0.0009765625, 0.00048828125, 0.000244140625, 0.0001220703125, 0.00006103515625, 0.000030517578125 };
    40     public ValueLookupParameter<DoubleData> MinimumParameter {
    41       get { return (ValueLookupParameter<DoubleData>)Parameters["Minimum"]; }
     40    public ValueLookupParameter<DoubleValue> MinimumParameter {
     41      get { return (ValueLookupParameter<DoubleValue>)Parameters["Minimum"]; }
    4242    }
    43     public ValueLookupParameter<DoubleData> MaximumParameter {
    44       get { return (ValueLookupParameter<DoubleData>)Parameters["Maximum"]; }
     43    public ValueLookupParameter<DoubleValue> MaximumParameter {
     44      get { return (ValueLookupParameter<DoubleValue>)Parameters["Maximum"]; }
    4545    }
    46     public ValueLookupParameter<DoubleData> SearchIntervalFactorParameter {
    47       get { return (ValueLookupParameter<DoubleData>)Parameters["SearchIntervalFactor"]; }
     46    public ValueLookupParameter<DoubleValue> SearchIntervalFactorParameter {
     47      get { return (ValueLookupParameter<DoubleValue>)Parameters["SearchIntervalFactor"]; }
    4848    }
    4949    /// <summary>
     
    5353    public BreederGeneticAlgorithmManipulator()
    5454      : base() {
    55       Parameters.Add(new ValueLookupParameter<DoubleData>("Minimum", "The lower bound for each element in the vector."));
    56       Parameters.Add(new ValueLookupParameter<DoubleData>("Maximum", "The upper bound for each element in the vector."));
    57       Parameters.Add(new ValueLookupParameter<DoubleData>("SearchIntervalFactor", "The factor determining the size of the search interval, that will be added/removed to/from the allele selected for manipulation.", new DoubleData(0.1)));
     55      Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "The lower bound for each element in the vector."));
     56      Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "The upper bound for each element in the vector."));
     57      Parameters.Add(new ValueLookupParameter<DoubleValue>("SearchIntervalFactor", "The factor determining the size of the search interval, that will be added/removed to/from the allele selected for manipulation.", new DoubleValue(0.1)));
    5858    }
    5959
     
    6666    /// <param name="max">The maximum number of the sampling range for the vector element (exclusive).</param>
    6767    /// <param name="searchIntervalFactor">The factor determining the size of the search interval.</param>
    68     public static void Apply(IRandom random, DoubleArrayData vector, DoubleData min, DoubleData max, DoubleData searchIntervalFactor) {
     68    public static void Apply(IRandom random, DoubleArray vector, DoubleValue min, DoubleValue max, DoubleValue searchIntervalFactor) {
    6969      int length = vector.Length;
    7070      double prob, value;
     
    114114
    115115    /// <summary>
    116     /// Checks the parameters Minimum, Maximum, and SearchIntervalFactor and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleData, DoubleData, DoubleData)"/>.
     116    /// Checks the parameters Minimum, Maximum, and SearchIntervalFactor and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue, DoubleValue)"/>.
    117117    /// </summary>
    118118    /// <param name="random">A random number generator.</param>
    119119    /// <param name="realVector">The real vector to manipulate.</param>
    120     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     120    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    121121      if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("BreederGeneticAlgorithmManipulator: Parameter " + MinimumParameter.ActualName + " could not be found.");
    122122      if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("BreederGeneticAlgorithmManipulator: Paraemter " + MaximumParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/MichalewiczNonUniformAllPositionsManipulator.cs

    r3017 r3048  
    4040    /// The lower bound of the values in the real vector.
    4141    /// </summary>
    42     public ValueLookupParameter<DoubleData> MinimumParameter {
    43       get { return (ValueLookupParameter<DoubleData>)Parameters["Minimum"]; }
     42    public ValueLookupParameter<DoubleValue> MinimumParameter {
     43      get { return (ValueLookupParameter<DoubleValue>)Parameters["Minimum"]; }
    4444    }
    4545    /// <summary>
    4646    /// The upper bound of the values in the real vector.
    4747    /// </summary>
    48     public ValueLookupParameter<DoubleData> MaximumParameter {
    49       get { return (ValueLookupParameter<DoubleData>)Parameters["Maximum"]; }
     48    public ValueLookupParameter<DoubleValue> MaximumParameter {
     49      get { return (ValueLookupParameter<DoubleValue>)Parameters["Maximum"]; }
    5050    }
    5151    /// <summary>
    5252    /// The current generation.
    5353    /// </summary>
    54     public LookupParameter<IntData> GenerationParameter {
    55       get { return (LookupParameter<IntData>)Parameters["Generation"]; }
     54    public LookupParameter<IntValue> GenerationParameter {
     55      get { return (LookupParameter<IntValue>)Parameters["Generation"]; }
    5656    }
    5757    /// <summary>
    5858    /// The maximum generation.
    5959    /// </summary>
    60     public LookupParameter<IntData> MaximumGenerationsParameter {
    61       get { return (LookupParameter<IntData>)Parameters["MaximumGenerations"]; }
     60    public LookupParameter<IntValue> MaximumGenerationsParameter {
     61      get { return (LookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
    6262    }
    6363    /// <summary>
    6464    /// The parameter describing how much the mutation should depend on the progress towards the maximum generation.
    6565    /// </summary>
    66     public ValueLookupParameter<DoubleData> GenerationDependencyParameter {
    67       get { return (ValueLookupParameter<DoubleData>)Parameters["GenerationDependency"]; }
     66    public ValueLookupParameter<DoubleValue> GenerationDependencyParameter {
     67      get { return (ValueLookupParameter<DoubleValue>)Parameters["GenerationDependency"]; }
    6868    }
    6969
     
    7575    public MichalewiczNonUniformAllPositionsManipulator()
    7676      : base() {
    77       Parameters.Add(new ValueLookupParameter<DoubleData>("Minimum", "Minimum of the sampling range for the vector element (included)"));
    78       Parameters.Add(new ValueLookupParameter<DoubleData>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
    79       Parameters.Add(new LookupParameter<IntData>("Generation", "Current generation of the algorithm"));
    80       Parameters.Add(new LookupParameter<IntData>("MaximumGenerations", "Maximum number of generations"));
    81       Parameters.Add(new ValueLookupParameter<DoubleData>("GenerationDependency", "Specifies the degree of dependency on the number of generations", new DoubleData(5)));
     77      Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "Minimum of the sampling range for the vector element (included)"));
     78      Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
     79      Parameters.Add(new LookupParameter<IntValue>("Generation", "Current generation of the algorithm"));
     80      Parameters.Add(new LookupParameter<IntValue>("MaximumGenerations", "Maximum number of generations"));
     81      Parameters.Add(new ValueLookupParameter<DoubleValue>("GenerationDependency", "Specifies the degree of dependency on the number of generations", new DoubleValue(5)));
    8282    }
    8383
     
    9595    /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations.</param>
    9696    /// <returns>The manipulated real vector.</returns>
    97     public static void Apply(IRandom random, DoubleArrayData vector, DoubleData min, DoubleData max, IntData currentGeneration, IntData maximumGenerations, DoubleData generationsDependency) {
     97    public static void Apply(IRandom random, DoubleArray vector, DoubleValue min, DoubleValue max, IntValue currentGeneration, IntValue maximumGenerations, DoubleValue generationsDependency) {
    9898      if (currentGeneration.Value > maximumGenerations.Value) throw new ArgumentException("MichalewiczNonUniformAllPositionManipulator: CurrentGeneration must be smaller or equal than MaximumGeneration", "currentGeneration");
    9999      int length = vector.Length;
     
    111111
    112112    /// <summary>
    113     /// Checks if all parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleData, DoubleData, IntData, IntData, DoubleData)"/>.
     113    /// Checks if all parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue, IntValue, IntValue, DoubleValue)"/>.
    114114    /// </summary>
    115115    /// <param name="random">The random number generator.</param>
    116116    /// <param name="realVector">The real vector that should be manipulated.</param>
    117     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     117    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    118118      if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("MichalewiczNonUniformAllPositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found.");
    119119      if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("MichalewiczNonUniformAllPositionManipulator: Parameter " + MaximumParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/MichalewiczNonUniformOnePositionManipulator.cs

    r3017 r3048  
    4040    /// The lower bound of the values in the real vector.
    4141    /// </summary>
    42     public ValueLookupParameter<DoubleData> MinimumParameter {
    43       get { return (ValueLookupParameter<DoubleData>)Parameters["Minimum"]; }
     42    public ValueLookupParameter<DoubleValue> MinimumParameter {
     43      get { return (ValueLookupParameter<DoubleValue>)Parameters["Minimum"]; }
    4444    }
    4545    /// <summary>
    4646    /// The upper bound of the values in the real vector.
    4747    /// </summary>
    48     public ValueLookupParameter<DoubleData> MaximumParameter {
    49       get { return (ValueLookupParameter<DoubleData>)Parameters["Maximum"]; }
     48    public ValueLookupParameter<DoubleValue> MaximumParameter {
     49      get { return (ValueLookupParameter<DoubleValue>)Parameters["Maximum"]; }
    5050    }
    5151    /// <summary>
    5252    /// The current generation.
    5353    /// </summary>
    54     public LookupParameter<IntData> GenerationParameter {
    55       get { return (LookupParameter<IntData>)Parameters["Generation"]; }
     54    public LookupParameter<IntValue> GenerationParameter {
     55      get { return (LookupParameter<IntValue>)Parameters["Generation"]; }
    5656    }
    5757    /// <summary>
    5858    /// The maximum generation.
    5959    /// </summary>
    60     public LookupParameter<IntData> MaximumGenerationsParameter {
    61       get { return (LookupParameter<IntData>)Parameters["MaximumGenerations"]; }
     60    public LookupParameter<IntValue> MaximumGenerationsParameter {
     61      get { return (LookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
    6262    }
    6363    /// <summary>
    6464    /// The parameter describing how much the mutation should depend on the progress towards the maximum generation.
    6565    /// </summary>
    66     public ValueLookupParameter<DoubleData> GenerationDependencyParameter {
    67       get { return (ValueLookupParameter<DoubleData>)Parameters["GenerationDependency"]; }
     66    public ValueLookupParameter<DoubleValue> GenerationDependencyParameter {
     67      get { return (ValueLookupParameter<DoubleValue>)Parameters["GenerationDependency"]; }
    6868    }
    6969
     
    7575    public MichalewiczNonUniformOnePositionManipulator()
    7676      : base() {
    77       Parameters.Add(new ValueLookupParameter<DoubleData>("Minimum", "Minimum of the sampling range for the vector element (included)"));
    78       Parameters.Add(new ValueLookupParameter<DoubleData>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
    79       Parameters.Add(new LookupParameter<IntData>("Generation", "Current generation of the algorithm"));
    80       Parameters.Add(new LookupParameter<IntData>("MaximumGenerations", "Maximum number of generations"));
    81       Parameters.Add(new ValueLookupParameter<DoubleData>("GenerationDependency", "Specifies the degree of dependency on the number of generations", new DoubleData(5)));
     77      Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "Minimum of the sampling range for the vector element (included)"));
     78      Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
     79      Parameters.Add(new LookupParameter<IntValue>("Generation", "Current generation of the algorithm"));
     80      Parameters.Add(new LookupParameter<IntValue>("MaximumGenerations", "Maximum number of generations"));
     81      Parameters.Add(new ValueLookupParameter<DoubleValue>("GenerationDependency", "Specifies the degree of dependency on the number of generations", new DoubleValue(5)));
    8282    }
    8383
     
    9595    /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations.</param>
    9696    /// <returns>The manipulated real vector.</returns>
    97     public static void Apply(IRandom random, DoubleArrayData vector, DoubleData min, DoubleData max, IntData currentGeneration, IntData maximumGenerations, DoubleData generationsDependency) {
     97    public static void Apply(IRandom random, DoubleArray vector, DoubleValue min, DoubleValue max, IntValue currentGeneration, IntValue maximumGenerations, DoubleValue generationsDependency) {
    9898      if (currentGeneration.Value > maximumGenerations.Value) throw new ArgumentException("MichalewiczNonUniformOnePositionManipulator: CurrentGeneration must be smaller or equal than MaximumGeneration", "currentGeneration");
    9999      int length = vector.Length;
     
    110110
    111111    /// <summary>
    112     /// Checks if all parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleData, DoubleData, IntData, IntData, DoubleData)"/>.
     112    /// Checks if all parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue, IntValue, IntValue, DoubleValue)"/>.
    113113    /// </summary>
    114114    /// <param name="random">The random number generator.</param>
    115115    /// <param name="realVector">The real vector that should be manipulated.</param>
    116     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     116    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    117117      if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("MichalewiczNonUniformOnePositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found.");
    118118      if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("MichalewiczNonUniformOnePositionManipulator: Parameter " + MaximumParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/PolynomialAllPositionManipulator.cs

    r3017 r3048  
    4141    /// A higher value will shape the density function such that values closer to 0 (little manipulation) are more likely than values closer to 1 or -1 (maximum manipulation).
    4242    /// </summary>
    43     public ValueLookupParameter<DoubleData> ContiguityParameter {
    44       get { return (ValueLookupParameter<DoubleData>)Parameters["Contiguity"]; }
     43    public ValueLookupParameter<DoubleValue> ContiguityParameter {
     44      get { return (ValueLookupParameter<DoubleValue>)Parameters["Contiguity"]; }
    4545    }
    4646    /// <summary>
     
    5050    /// The manipulated value is not restricted by the (possibly) specified lower and upper bounds. Use the <see cref="BoundsChecker"/> to correct the values after performing the mutation.
    5151    /// </remarks>
    52     public ValueLookupParameter<DoubleData> MaximumManipulationParameter {
    53       get { return (ValueLookupParameter<DoubleData>)Parameters["MaximumManipulation"]; }
     52    public ValueLookupParameter<DoubleValue> MaximumManipulationParameter {
     53      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumManipulation"]; }
    5454    }
    5555
     
    6060    public PolynomialAllPositionManipulator()
    6161      : base() {
    62       Parameters.Add(new ValueLookupParameter<DoubleData>("Contiguity", "Specifies whether the manipulation should produce far stretching (small value) or close (large value) manipulations with higher probability. Valid values must be greater or equal to 0.", new DoubleData(2)));
    63       Parameters.Add(new ValueLookupParameter<DoubleData>("MaximumManipulation", "Specifies the maximum value that should be added or subtracted by the manipulation. If this value is set to 0 no mutation will be performed.", new DoubleData(1)));
     62      Parameters.Add(new ValueLookupParameter<DoubleValue>("Contiguity", "Specifies whether the manipulation should produce far stretching (small value) or close (large value) manipulations with higher probability. Valid values must be greater or equal to 0.", new DoubleValue(2)));
     63      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumManipulation", "Specifies the maximum value that should be added or subtracted by the manipulation. If this value is set to 0 no mutation will be performed.", new DoubleValue(1)));
    6464    }
    6565
     
    7171    /// <param name="contiguity">A parameter describing the shape of the probability density function which influences the strength of the manipulation.</param>
    7272    /// <param name="maxManipulation">The maximum strength of the manipulation.</param>
    73     public static void Apply(IRandom random, DoubleArrayData vector, DoubleData contiguity, DoubleData maxManipulation) {
     73    public static void Apply(IRandom random, DoubleArray vector, DoubleValue contiguity, DoubleValue maxManipulation) {
    7474      if (contiguity.Value < 0) throw new ArgumentException("PolynomialAllPositionManipulator: Contiguity value is smaller than 0", "contiguity");
    7575      double u, delta = 0;
     
    8888
    8989    /// <summary>
    90     /// Checks the availability of the parameters and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleData, DoubleData)"/>.
     90    /// Checks the availability of the parameters and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue)"/>.
    9191    /// </summary>
    9292    /// <param name="random">The random number generator to use.</param>
    9393    /// <param name="realVector">The vector of real values to manipulate.</param>
    94     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     94    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    9595      if (ContiguityParameter.ActualValue == null) throw new InvalidOperationException("PolynomialAllPositionManipulator: Parameter " + ContiguityParameter.ActualName + " could not be found.");
    9696      if (MaximumManipulationParameter.ActualValue == null) throw new InvalidOperationException("PolynomialAllPositionManipulator: Parameter " + MaximumManipulationParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/PolynomialOnePositionManipulator.cs

    r3017 r3048  
    4040    /// A higher value will shape the density function such that values closer to 0 (little manipulation) are more likely than values closer to 1 or -1 (maximum manipulation).
    4141    /// </summary>
    42     public ValueLookupParameter<DoubleData> ContiguityParameter {
    43       get { return (ValueLookupParameter<DoubleData>)Parameters["Contiguity"]; }
     42    public ValueLookupParameter<DoubleValue> ContiguityParameter {
     43      get { return (ValueLookupParameter<DoubleValue>)Parameters["Contiguity"]; }
    4444    }
    4545    /// <summary>
     
    4949    /// The manipulated value is not restricted by the (possibly) specified lower and upper bounds. Use the <see cref="BoundsChecker"/> to correct the values after performing the mutation.
    5050    /// </remarks>
    51     public ValueLookupParameter<DoubleData> MaximumManipulationParameter {
    52       get { return (ValueLookupParameter<DoubleData>)Parameters["MaximumManipulation"]; }
     51    public ValueLookupParameter<DoubleValue> MaximumManipulationParameter {
     52      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumManipulation"]; }
    5353    }
    5454
     
    5959    public PolynomialOnePositionManipulator()
    6060      : base() {
    61       Parameters.Add(new ValueLookupParameter<DoubleData>("Contiguity", "Specifies whether the manipulation should produce far stretching (small value) or close (large value) manipulations with higher probability. Valid values must be greater or equal to 0.", new DoubleData(2)));
    62       Parameters.Add(new ValueLookupParameter<DoubleData>("MaximumManipulation", "Specifies the maximum value that should be added or subtracted by the manipulation. If this value is set to 0 no mutation will be performed.", new DoubleData(1)));
     61      Parameters.Add(new ValueLookupParameter<DoubleValue>("Contiguity", "Specifies whether the manipulation should produce far stretching (small value) or close (large value) manipulations with higher probability. Valid values must be greater or equal to 0.", new DoubleValue(2)));
     62      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumManipulation", "Specifies the maximum value that should be added or subtracted by the manipulation. If this value is set to 0 no mutation will be performed.", new DoubleValue(1)));
    6363    }
    6464
     
    7070    /// <param name="contiguity">A parameter describing the shape of the probability density function which influences the strength of the manipulation.</param>
    7171    /// <param name="maxManipulation">The maximum strength of the manipulation.</param>
    72     public static void Apply(IRandom random, DoubleArrayData vector, DoubleData contiguity, DoubleData maxManipulation) {
     72    public static void Apply(IRandom random, DoubleArray vector, DoubleValue contiguity, DoubleValue maxManipulation) {
    7373      if (contiguity.Value < 0) throw new ArgumentException("PolynomialOnePositionManipulator: Contiguity value is smaller than 0", "contiguity");
    7474      int index = random.Next(vector.Length);
     
    8585
    8686    /// <summary>
    87     /// Checks the availability of the parameters and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleData, DoubleData)"/>.
     87    /// Checks the availability of the parameters and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue)"/>.
    8888    /// </summary>
    8989    /// <param name="random">The random number generator to use.</param>
    9090    /// <param name="realVector">The vector of real values to manipulate.</param>
    91     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     91    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    9292      if (ContiguityParameter.ActualValue == null) throw new InvalidOperationException("PolynomialOnePositionManipulator: Parameter " + ContiguityParameter.ActualName + " could not be found.");
    9393      if (MaximumManipulationParameter.ActualValue == null) throw new InvalidOperationException("PolynomialOnePositionManipulator: Parameter " + MaximumManipulationParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/SelfAdaptiveNormalAllPositionsManipulator.cs

    r3017 r3048  
    4242    /// Parameter for the strategy vector.
    4343    /// </summary>
    44     public LookupParameter<DoubleArrayData> StrategyVectorParameter {
    45       get { return (LookupParameter<DoubleArrayData>)Parameters["StrategyVector"]; }
     44    public LookupParameter<DoubleArray> StrategyVectorParameter {
     45      get { return (LookupParameter<DoubleArray>)Parameters["StrategyVector"]; }
    4646    }
    4747    /// <summary>
     
    5151    public SelfAdaptiveNormalAllPositionsManipulator()
    5252      : base() {
    53       Parameters.Add(new LookupParameter<DoubleArrayData>("StrategyVector", "The vector containing the endogenous strategy parameters."));
     53      Parameters.Add(new LookupParameter<DoubleArray>("StrategyVector", "The vector containing the endogenous strategy parameters."));
    5454    }
    5555
     
    6464    /// <param name="vector">The real vector to manipulate.</param>
    6565    /// <returns>The manipulated real vector.</returns>
    66     public static void Apply(IRandom random, DoubleArrayData vector, DoubleArrayData strategyParameters) {
     66    public static void Apply(IRandom random, DoubleArray vector, DoubleArray strategyParameters) {
    6767      NormalDistributedRandom N = new NormalDistributedRandom(random, 0.0, 1.0);
    6868      for (int i = 0; i < vector.Length; i++) {
     
    7272
    7373    /// <summary>
    74     /// Checks that the strategy vector is not null and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleArrayData)"/>.
     74    /// Checks that the strategy vector is not null and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleArray)"/>.
    7575    /// </summary>
    7676    /// <param name="random">The random number generator.</param>
    7777    /// <param name="realVector">The vector of real values that is manipulated.</param>
    78     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     78    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    7979      if (StrategyVectorParameter.ActualValue == null) throw new InvalidOperationException("SelfAdaptiveNormalAllPositionsManipulator: Parameter " + StrategyVectorParameter.ActualName + " could not be found.");
    8080      Apply(random, realVector, StrategyVectorParameter.ActualValue);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Manipulators/UniformOnePositionManipulator.cs

    r3017 r3048  
    3939    /// The lower bound of the values in the real vector.
    4040    /// </summary>
    41     public ValueLookupParameter<DoubleData> MinimumParameter {
    42       get { return (ValueLookupParameter<DoubleData>)Parameters["Minimum"]; }
     41    public ValueLookupParameter<DoubleValue> MinimumParameter {
     42      get { return (ValueLookupParameter<DoubleValue>)Parameters["Minimum"]; }
    4343    }
    4444    /// <summary>
    4545    /// The upper bound of the values in the real vector.
    4646    /// </summary>
    47     public ValueLookupParameter<DoubleData> MaximumParameter {
    48       get { return (ValueLookupParameter<DoubleData>)Parameters["Maximum"]; }
     47    public ValueLookupParameter<DoubleValue> MaximumParameter {
     48      get { return (ValueLookupParameter<DoubleValue>)Parameters["Maximum"]; }
    4949    }
    5050
     
    5454    /// </summary>
    5555    public UniformOnePositionManipulator() {
    56       Parameters.Add(new ValueLookupParameter<DoubleData>("Minimum", "Minimum of the sampling range for the vector element (included)"));
    57       Parameters.Add(new ValueLookupParameter<DoubleData>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
     56      Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "Minimum of the sampling range for the vector element (included)"));
     57      Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "Maximum of the sampling range for the vector element (excluded)"));
    5858    }
    5959
     
    6767    /// <param name="max">The maximum value of the sampling range for
    6868    /// the vector element to change (exclusive).</param>
    69     public static void Apply(IRandom random, DoubleArrayData vector, DoubleData min, DoubleData max) {
     69    public static void Apply(IRandom random, DoubleArray vector, DoubleValue min, DoubleValue max) {
    7070      int index = random.Next(vector.Length);
    7171      vector[index] = min.Value + random.NextDouble() * (max.Value - min.Value);
     
    7373
    7474    /// <summary>
    75     /// Checks if the minimum and maximum parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArrayData, DoubleData, DoubleData)"/>.
     75    /// Checks if the minimum and maximum parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue)"/>.
    7676    /// </summary>
    7777    /// <param name="random">The random number generator to use.</param>
    7878    /// <param name="realVector">The real vector to manipulate.</param>
    79     protected override void Manipulate(IRandom random, DoubleArrayData realVector) {
     79    protected override void Manipulate(IRandom random, DoubleArray realVector) {
    8080      if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found.");
    8181      if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MaximumParameter.ActualName + " could not be found.");
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/RealVectorCreator.cs

    r3034 r3048  
    4141      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    4242    }
    43     public ILookupParameter<DoubleArrayData> RealVectorParameter {
    44       get { return (ILookupParameter<DoubleArrayData>)Parameters["RealVector"]; }
     43    public ILookupParameter<DoubleArray> RealVectorParameter {
     44      get { return (ILookupParameter<DoubleArray>)Parameters["RealVector"]; }
    4545    }
    46     public IValueLookupParameter<IntData> LengthParameter {
    47       get { return (IValueLookupParameter<IntData>)Parameters["Length"]; }
     46    public IValueLookupParameter<IntValue> LengthParameter {
     47      get { return (IValueLookupParameter<IntValue>)Parameters["Length"]; }
    4848    }
    49     public IValueLookupParameter<DoubleData> MinimumParameter {
    50       get { return (IValueLookupParameter<DoubleData>)Parameters["Minimum"]; }
     49    public IValueLookupParameter<DoubleValue> MinimumParameter {
     50      get { return (IValueLookupParameter<DoubleValue>)Parameters["Minimum"]; }
    5151    }
    52     public IValueLookupParameter<DoubleData> MaximumParameter {
    53       get { return (IValueLookupParameter<DoubleData>)Parameters["Maximum"]; }
     52    public IValueLookupParameter<DoubleValue> MaximumParameter {
     53      get { return (IValueLookupParameter<DoubleValue>)Parameters["Maximum"]; }
    5454    }
    5555
     
    5757      : base() {
    5858      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    59       Parameters.Add(new LookupParameter<DoubleArrayData>("RealVector", "The vector which should be manipulated."));
    60       Parameters.Add(new ValueLookupParameter<IntData>("Length", "The length of the vector."));
    61       Parameters.Add(new ValueLookupParameter<DoubleData>("Minimum", "The lower bound for each element in the vector."));
    62       Parameters.Add(new ValueLookupParameter<DoubleData>("Maximum", "The upper bound for each element in the vector."));
     59      Parameters.Add(new LookupParameter<DoubleArray>("RealVector", "The vector which should be manipulated."));
     60      Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector."));
     61      Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "The lower bound for each element in the vector."));
     62      Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "The upper bound for each element in the vector."));
    6363    }
    6464
     
    6868    }
    6969
    70     protected abstract DoubleArrayData Create(IRandom random, IntData length, DoubleData minimum, DoubleData maximum);
     70    protected abstract DoubleArray Create(IRandom random, IntValue length, DoubleValue minimum, DoubleValue maximum);
    7171  }
    7272}
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/RealVectorCrossover.cs

    r3034 r3048  
    4141      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    4242    }
    43     public ILookupParameter<ItemArray<DoubleArrayData>> ParentsParameter {
    44       get { return (SubScopesLookupParameter<DoubleArrayData>)Parameters["Parents"]; }
     43    public ILookupParameter<ItemArray<DoubleArray>> ParentsParameter {
     44      get { return (SubScopesLookupParameter<DoubleArray>)Parameters["Parents"]; }
    4545    }
    46     public ILookupParameter<DoubleArrayData> ChildParameter {
    47       get { return (ILookupParameter<DoubleArrayData>)Parameters["Child"]; }
     46    public ILookupParameter<DoubleArray> ChildParameter {
     47      get { return (ILookupParameter<DoubleArray>)Parameters["Child"]; }
    4848    }
    4949
     
    5151      : base() {
    5252      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
    53       Parameters.Add(new SubScopesLookupParameter<DoubleArrayData>("Parents", "The parent vectors which should be crossed."));
    54       Parameters.Add(new LookupParameter<DoubleArrayData>("Child", "The child vector resulting from the crossover."));
     53      Parameters.Add(new SubScopesLookupParameter<DoubleArray>("Parents", "The parent vectors which should be crossed."));
     54      Parameters.Add(new LookupParameter<DoubleArray>("Child", "The child vector resulting from the crossover."));
    5555    }
    5656
     
    6060    }
    6161
    62     protected abstract DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents);
     62    protected abstract DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents);
    6363  }
    6464}
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/RealVectorManipulator.cs

    r3034 r3048  
    4141      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    4242    }
    43     public ILookupParameter<DoubleArrayData> RealVectorParameter {
    44       get { return (ILookupParameter<DoubleArrayData>)Parameters["RealVector"]; }
     43    public ILookupParameter<DoubleArray> RealVectorParameter {
     44      get { return (ILookupParameter<DoubleArray>)Parameters["RealVector"]; }
    4545    }
    4646
     
    4848      : base() {
    4949      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    50       Parameters.Add(new LookupParameter<DoubleArrayData>("RealVector", "The vector which should be manipulated."));
     50      Parameters.Add(new LookupParameter<DoubleArray>("RealVector", "The vector which should be manipulated."));
    5151    }
    5252
     
    5656    }
    5757
    58     protected abstract void Manipulate(IRandom random, DoubleArrayData realVector);
     58    protected abstract void Manipulate(IRandom random, DoubleArray realVector);
    5959  }
    6060}
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/Auxiliary.cs

    r2929 r3048  
    2525namespace HeuristicLab.Encodings.RealVector_33.Tests {
    2626  public static class Auxiliary {
    27     public static bool RealVectorIsAlmostEqualByPosition(DoubleArrayData p1, DoubleArrayData p2) {
     27    public static bool RealVectorIsAlmostEqualByPosition(DoubleArray p1, DoubleArray p2) {
    2828      bool equal = (p1.Length == p2.Length);
    2929      if (equal) {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/BlendAlphaBetaCrossoverTest.cs

    r2936 r3048  
    6868    public void BlendAlphaBetaCrossoverCrossTest() {
    6969      BlendAlphaBetaCrossover_Accessor target = new BlendAlphaBetaCrossover_Accessor(new PrivateObject(typeof(BlendAlphaBetaCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      } catch (System.ArgumentException) {
     
    8484      // The following test checks if there is an exception when there are less than 2 parents
    8585      random.Reset();
    86       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     86      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8787      exceptionFired = false;
    8888      try {
    89         DoubleArrayData actual;
     89        DoubleArray actual;
    9090        actual = target.Cross(random, parents);
    9191      } catch (System.ArgumentException) {
     
    101101    public void BlendAlphaBetaCrossoverApplyTest() {
    102102      TestRandom random = new TestRandom();
    103       DoubleArrayData parent1, parent2, expected, actual;
    104       DoubleData alpha;
    105       DoubleData beta;
     103      DoubleArray parent1, parent2, expected, actual;
     104      DoubleValue alpha;
     105      DoubleValue beta;
    106106      bool exceptionFired;
    107107      // The following test is not based on published examples
    108108      random.Reset();
    109109      random.DoubleNumbers = new double[] { 0.5, 0.5, 0.5, 0.5, 0.5 };
    110       alpha = new DoubleData(0.5);
    111       beta = new DoubleData(0.5);
    112       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    113       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    114       expected = new DoubleArrayData(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
     110      alpha = new DoubleValue(0.5);
     111      beta = new DoubleValue(0.5);
     112      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     113      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     114      expected = new DoubleArray(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
    115115      actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
    116116      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    118118      random.Reset();
    119119      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25 };
    120       alpha = new DoubleData(-0.25); // negative values for alpha are not allowed
    121       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    122       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     120      alpha = new DoubleValue(-0.25); // negative values for alpha are not allowed
     121      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     122      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    123123      exceptionFired = false;
    124124      try {
     
    131131      random.Reset();
    132132      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25, .75 };
    133       alpha = new DoubleData(0.25);
    134       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    135       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     133      alpha = new DoubleValue(0.25);
     134      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     135      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    136136      exceptionFired = false;
    137137      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/BlendAlphaCrossoverTest.cs

    r2929 r3048  
    6868    public void BlendAlphaCrossoverCrossTest() {
    6969      BlendAlphaCrossover_Accessor target = new BlendAlphaCrossover_Accessor(new PrivateObject(typeof(BlendAlphaCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      } catch (System.ArgumentException) {
     
    8484      // The following test checks if there is an exception when there are less than 2 parents
    8585      random.Reset();
    86       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     86      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8787      exceptionFired = false;
    8888      try {
    89         DoubleArrayData actual;
     89        DoubleArray actual;
    9090        actual = target.Cross(random, parents);
    9191      } catch (System.ArgumentException) {
     
    101101    public void BlendAlphaCrossoverApplyTest() {
    102102      TestRandom random = new TestRandom();
    103       DoubleArrayData parent1, parent2, expected, actual;
    104       DoubleData alpha;
     103      DoubleArray parent1, parent2, expected, actual;
     104      DoubleValue alpha;
    105105      bool exceptionFired;
    106106      // The following test is not based on published examples
    107107      random.Reset();
    108108      random.DoubleNumbers = new double[] { 0.5, 0.5, 0.5, 0.5, 0.5 };
    109       alpha = new DoubleData(0.5);
    110       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    111       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    112       expected = new DoubleArrayData(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
     109      alpha = new DoubleValue(0.5);
     110      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     111      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     112      expected = new DoubleArray(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
    113113      actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
    114114      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    116116      random.Reset();
    117117      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25 };
    118       alpha = new DoubleData(0.25);
    119       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    120       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    121       expected = new DoubleArrayData(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
     118      alpha = new DoubleValue(0.25);
     119      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     120      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     121      expected = new DoubleArray(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
    122122      actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
    123123      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    125125      random.Reset();
    126126      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25 };
    127       alpha = new DoubleData(-0.25); // negative values for alpha are not allowed
    128       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    129       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    130       expected = new DoubleArrayData(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
     127      alpha = new DoubleValue(-0.25); // negative values for alpha are not allowed
     128      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     129      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     130      expected = new DoubleArray(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
    131131      exceptionFired = false;
    132132      try {
     
    139139      random.Reset();
    140140      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25, .75 };
    141       alpha = new DoubleData(0.25);
    142       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    143       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    144       expected = new DoubleArrayData(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
     141      alpha = new DoubleValue(0.25);
     142      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     143      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     144      expected = new DoubleArray(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
    145145      exceptionFired = false;
    146146      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/DiscreteCrossoverTest.cs

    r2936 r3048  
    6868    public void DiscreteCrossoverCrossTest() {
    6969      DiscreteCrossover_Accessor target = new DiscreteCrossover_Accessor(new PrivateObject(typeof(DiscreteCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are less than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      } catch (System.ArgumentException) {
     
    9090    public void DiscreteCrossoverApplyTest() {
    9191      TestRandom random = new TestRandom();
    92       DoubleArrayData parent1, parent2, expected, actual;
    93       ItemArray<DoubleArrayData> parents;
     92      DoubleArray parent1, parent2, expected, actual;
     93      ItemArray<DoubleArray> parents;
    9494      bool exceptionFired;
    9595      // The following test is not based on published examples
    9696      random.Reset();
    9797      random.IntNumbers = new int[] { 0, 0, 1, 0, 1 };
    98       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    99       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    100       parents = new ItemArray<DoubleArrayData>( new DoubleArrayData[] { parent1, parent2 } );
    101       expected = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.8 });
     98      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     99      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     100      parents = new ItemArray<DoubleArray>( new DoubleArray[] { parent1, parent2 } );
     101      expected = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.8 });
    102102      actual = DiscreteCrossover.Apply(random, parents);
    103103      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    105105      random.Reset();
    106106      random.IntNumbers = new int[] { 0, 0, 1, 0, 1, 0 };
    107       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    108       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    109       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { parent1, parent2 });
     107      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     108      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     109      parents = new ItemArray<DoubleArray>(new DoubleArray[] { parent1, parent2 });
    110110      exceptionFired = false;
    111111      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/HeuristicCrossoverTest.cs

    r2936 r3048  
    6868    public void HeuristicCrossoverCrossTest() {
    6969      HeuristicCrossover_Accessor target = new HeuristicCrossover_Accessor(new PrivateObject(typeof(HeuristicCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      }
     
    8585      // The following test checks if there is an exception when there are less than 2 parents
    8686      random.Reset();
    87       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     87      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         DoubleArrayData actual;
     90        DoubleArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void HeuristicCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       DoubleArrayData parent1, parent2, expected, actual;
     104      DoubleArray parent1, parent2, expected, actual;
    105105      bool exceptionFired;
    106106      // The following test is not based on published examples
    107107      random.Reset();
    108108      random.DoubleNumbers = new double[] { 0.3 };
    109       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    111       expected = new DoubleArrayData(new double[] { 0.14, 0.23, 0.3, 0.59, -0.11 });
     109      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     110      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     111      expected = new DoubleArray(new double[] { 0.14, 0.23, 0.3, 0.59, -0.11 });
    112112      actual = HeuristicCrossover.Apply(random, parent1, parent2);
    113113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    115115      random.Reset();
    116116      random.DoubleNumbers = new double[] { 0.3 };
    117       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    118       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     117      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     118      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    119119      exceptionFired = false;
    120120      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/LocalCrossoverTest.cs

    r2936 r3048  
    6868    public void LocalCrossoverCrossTest() {
    6969      LocalCrossover_Accessor target = new LocalCrossover_Accessor(new PrivateObject(typeof(LocalCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      }
     
    8585      // The following test checks if there is an exception when there are less than 2 parents
    8686      random.Reset();
    87       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     87      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         DoubleArrayData actual;
     90        DoubleArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void LocalCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       DoubleArrayData parent1, parent2, expected, actual;
     104      DoubleArray parent1, parent2, expected, actual;
    105105      bool exceptionFired;
    106106      // The following test is not based on published examples
    107107      random.Reset();
    108108      random.DoubleNumbers = new double[] { 0.3, 0.1, 0.2, 0.4, 0.23 };
    109       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    111       expected = new DoubleArrayData(new double[] { 0.34, 0.11, 0.3, 0.32, 0.639 });
     109      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     110      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     111      expected = new DoubleArray(new double[] { 0.34, 0.11, 0.3, 0.32, 0.639 });
    112112      actual = LocalCrossover.Apply(random, parent1, parent2);
    113113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    115115      random.Reset();
    116116      random.DoubleNumbers = new double[] { 0.3, 0.1, 0.2, 0.4, 0.23, 0.5};
    117       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    118       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     117      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     118      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    119119      exceptionFired = false;
    120120      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/MichalewiczNonUniformAllPositionsManipulatorTest.cs

    r2936 r3048  
    8585    public void MichalewiczNonUniformAllPositionsManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArrayData parent, expected;
    88       DoubleData min, max, generationsDependency;
    89       IntData currentGeneration, maximumGenerations;
     87      DoubleArray parent, expected;
     88      DoubleValue min, max, generationsDependency;
     89      IntValue currentGeneration, maximumGenerations;
    9090      bool exceptionFired;
    9191      // The following test is not based on published examples
    9292      random.Reset();
    9393      random.DoubleNumbers = new double[] { 0.2, 0.5, 0.7, 0.8, 0.9, 0.5, 0.2, 0.5, 0.7, 0.8 };
    94       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    95       expected = new DoubleArrayData(new double[] { 0.45, 0.22, 0.3, 0.6, 0.14 });
    96       min = new DoubleData(0.3);
    97       max = new DoubleData(0.7);
    98       generationsDependency = new DoubleData(0.1);
    99       currentGeneration = new IntData(1);
    100       maximumGenerations = new IntData(4);
     94      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     95      expected = new DoubleArray(new double[] { 0.45, 0.22, 0.3, 0.6, 0.14 });
     96      min = new DoubleValue(0.3);
     97      max = new DoubleValue(0.7);
     98      generationsDependency = new DoubleValue(0.1);
     99      currentGeneration = new IntValue(1);
     100      maximumGenerations = new IntValue(4);
    101101      MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    102102      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     
    105105      random.Reset();
    106106      random.DoubleNumbers = new double[] { 0.2, 0.5, 0.7, 0.8, 0.9, 0.5, 0.2, 0.5, 0.7, 0.8 };
    107       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    108       min = new DoubleData(0.3);
    109       max = new DoubleData(0.7);
    110       generationsDependency = new DoubleData(0.1);
    111       currentGeneration = new IntData(5); //current generation > max generation
    112       maximumGenerations = new IntData(4);
     107      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     108      min = new DoubleValue(0.3);
     109      max = new DoubleValue(0.7);
     110      generationsDependency = new DoubleValue(0.1);
     111      currentGeneration = new IntValue(5); //current generation > max generation
     112      maximumGenerations = new IntValue(4);
    113113      try {
    114114        MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs

    r2936 r3048  
    8585    public void MichalewiczNonUniformOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArrayData parent, expected;
    88       DoubleData min, max, generationsDependency;
    89       IntData currentGeneration, maximumGenerations;
     87      DoubleArray parent, expected;
     88      DoubleValue min, max, generationsDependency;
     89      IntValue currentGeneration, maximumGenerations;
    9090      bool exceptionFired;
    9191      // The following test is not based on published examples
     
    9393      random.IntNumbers = new int[] { 3 };
    9494      random.DoubleNumbers = new double[] { 0.2, 0.7 };
    95       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    96       expected = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.34, 0.1 });
    97       min = new DoubleData(0.3);
    98       max = new DoubleData(0.7);
    99       generationsDependency = new DoubleData(0.1);
    100       currentGeneration = new IntData(1);
    101       maximumGenerations = new IntData(4);
     95      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     96      expected = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.34, 0.1 });
     97      min = new DoubleValue(0.3);
     98      max = new DoubleValue(0.7);
     99      generationsDependency = new DoubleValue(0.1);
     100      currentGeneration = new IntValue(1);
     101      maximumGenerations = new IntValue(4);
    102102      MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    103103      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     
    107107      random.IntNumbers = new int[] { 3 };
    108108      random.DoubleNumbers = new double[] { 0.2, 0.7 };
    109       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110       min = new DoubleData(0.3);
    111       max = new DoubleData(0.7);
    112       generationsDependency = new DoubleData(0.1);
    113       currentGeneration = new IntData(5); //current generation > max generation
    114       maximumGenerations = new IntData(4);
     109      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     110      min = new DoubleValue(0.3);
     111      max = new DoubleValue(0.7);
     112      generationsDependency = new DoubleValue(0.1);
     113      currentGeneration = new IntValue(5); //current generation > max generation
     114      maximumGenerations = new IntValue(4);
    115115      try {
    116116        MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/PolynomialAllPositionManipulatorTest.cs

    r2936 r3048  
    8585    public void PolynomialAllPositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArrayData parent, expected;
    88       DoubleData contiguity, maxManipulation;
     87      DoubleArray parent, expected;
     88      DoubleValue contiguity, maxManipulation;
    8989      bool exceptionFired;
    9090      // The following test is not based on published examples
    9191      random.Reset();
    9292      random.DoubleNumbers = new double[] { 0.2, 0.7, 0.8, 0.01, 0.1 };
    93       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    94       expected = new DoubleArrayData(new double[] { 0.120213215256006, 0.336631954950876, 0.474551336679454, 0.322759240811056, -0.0182075293954083 });
    95       contiguity = new DoubleData(0.8);
    96       maxManipulation = new DoubleData(0.2);
     93      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     94      expected = new DoubleArray(new double[] { 0.120213215256006, 0.336631954950876, 0.474551336679454, 0.322759240811056, -0.0182075293954083 });
     95      contiguity = new DoubleValue(0.8);
     96      maxManipulation = new DoubleValue(0.2);
    9797      PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation);
    9898      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     
    101101      random.Reset();
    102102      random.DoubleNumbers = new double[] { 0.2, 0.7, 0.8, 0.01, 0.1 };
    103       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    104       contiguity = new DoubleData(-1); //Contiguity value < 0
    105       maxManipulation = new DoubleData(0.2);
     103      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     104      contiguity = new DoubleValue(-1); //Contiguity value < 0
     105      maxManipulation = new DoubleValue(0.2);
    106106      try {
    107107        PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/PolynomialOnePositionManipulatorTest.cs

    r2936 r3048  
    8585    public void PolynomialOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArrayData parent, expected;
    88       DoubleData contiguity, maxManipulation;
     87      DoubleArray parent, expected;
     88      DoubleValue contiguity, maxManipulation;
    8989      bool exceptionFired;
    9090      // The following test is not based on published examples
     
    9292      random.IntNumbers = new int[] { 3 };
    9393      random.DoubleNumbers = new double[] { 0.2 };
    94       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    95       expected = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.1261980542102, 0.1 });
    96       contiguity = new DoubleData(0.2);
    97       maxManipulation = new DoubleData(0.7);
     94      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     95      expected = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.1261980542102, 0.1 });
     96      contiguity = new DoubleValue(0.2);
     97      maxManipulation = new DoubleValue(0.7);
    9898      PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
    9999      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     
    103103      random.IntNumbers = new int[] { 3 };
    104104      random.DoubleNumbers = new double[] { 0.2 };
    105       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    106       contiguity = new DoubleData(-1); //Contiguity value < 0
    107       maxManipulation = new DoubleData(0.2);
     105      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     106      contiguity = new DoubleValue(-1); //Contiguity value < 0
     107      maxManipulation = new DoubleValue(0.2);
    108108      try {
    109109        PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/RandomConvexCrossoverTest.cs

    r2936 r3048  
    6868    public void RandomConvexCrossoverCrossTest() {
    6969      RandomConvexCrossover_Accessor target = new RandomConvexCrossover_Accessor(new PrivateObject(typeof(RandomConvexCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      }
     
    8585      // The following test checks if there is an exception when there are less than 2 parents
    8686      random.Reset();
    87       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     87      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         DoubleArrayData actual;
     90        DoubleArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void RandomConvexCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       DoubleArrayData parent1, parent2, expected, actual;
     104      DoubleArray parent1, parent2, expected, actual;
    105105      bool exceptionFired;
    106106      // The following test is not based on published examples
    107107      random.Reset();
    108108      random.DoubleNumbers = new double[] { 0.3 };
    109       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    111       expected = new DoubleArrayData(new double[] { 0.34, 0.13, 0.3, 0.29, 0.59 });
     109      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     110      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     111      expected = new DoubleArray(new double[] { 0.34, 0.13, 0.3, 0.29, 0.59 });
    112112      actual = RandomConvexCrossover.Apply(random, parent1, parent2);
    113113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    115115      random.Reset();
    116116      random.DoubleNumbers = new double[] { 0.3 };
    117       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    118       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     117      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     118      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    119119      exceptionFired = false;
    120120      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/SimulatedBinaryCrossoverTest.cs

    r2936 r3048  
    6868    public void SimulatedBinaryCrossoverCrossTest() {
    6969      SimulatedBinaryCrossover_Accessor target = new SimulatedBinaryCrossover_Accessor(new PrivateObject(typeof(SimulatedBinaryCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      }
     
    8585      // The following test checks if there is an exception when there are less than 2 parents
    8686      random.Reset();
    87       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     87      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         DoubleArrayData actual;
     90        DoubleArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void SimulatedBinaryCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       DoubleArrayData parent1, parent2, expected, actual;
    105       DoubleData contiguity;
     104      DoubleArray parent1, parent2, expected, actual;
     105      DoubleValue contiguity;
    106106      bool exceptionFired;
    107107      // The following test is not based on published examples
    108108      random.Reset();
    109109      random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
    110       contiguity = new DoubleData(0.3);
    111       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    112       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    113       expected = new DoubleArrayData(new double[] { 1.11032829834638, -0.0145477755417797, 0.3, 0.5, 0.1 });
     110      contiguity = new DoubleValue(0.3);
     111      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     112      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     113      expected = new DoubleArray(new double[] { 1.11032829834638, -0.0145477755417797, 0.3, 0.5, 0.1 });
    114114      actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
    115115      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    117117      random.Reset();
    118118      random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
    119       contiguity = new DoubleData(0.3);
    120       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    121       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     119      contiguity = new DoubleValue(0.3);
     120      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     121      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    122122      exceptionFired = false;
    123123      try {
     
    130130      random.Reset();
    131131      random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
    132       contiguity = new DoubleData(-0.3);  //  contiguity < 0
    133       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1});
    134       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     132      contiguity = new DoubleValue(-0.3);  //  contiguity < 0
     133      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1});
     134      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    135135      exceptionFired = false;
    136136      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/SinglePointCrossoverTest.cs

    r2936 r3048  
    6868    public void SinglePointCrossoverCrossTest() {
    6969      SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover)));
    70       ItemArray<DoubleArrayData> parents;
     70      ItemArray<DoubleArray> parents;
    7171      TestRandom random = new TestRandom();
    7272      bool exceptionFired;
    7373      // The following test checks if there is an exception when there are more than 2 parents
    7474      random.Reset();
    75       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(5), new DoubleArrayData(6), new DoubleArrayData(4) });
     75      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(5), new DoubleArray(6), new DoubleArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         DoubleArrayData actual;
     78        DoubleArray actual;
    7979        actual = target.Cross(random, parents);
    8080      }
     
    8585      // The following test checks if there is an exception when there are less than 2 parents
    8686      random.Reset();
    87       parents = new ItemArray<DoubleArrayData>(new DoubleArrayData[] { new DoubleArrayData(4) });
     87      parents = new ItemArray<DoubleArray>(new DoubleArray[] { new DoubleArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         DoubleArrayData actual;
     90        DoubleArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void SinglePointCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       DoubleArrayData parent1, parent2, expected, actual;
     104      DoubleArray parent1, parent2, expected, actual;
    105105      bool exceptionFired;
    106106      // The following test is not based on published examples
    107107      random.Reset();
    108108      random.IntNumbers = new int[] { 3 };
    109       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    111       expected = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.2, 0.8 });
     109      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     110      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     111      expected = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.2, 0.8 });
    112112      actual = SinglePointCrossover.Apply(random, parent1, parent2);
    113113      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
     
    115115      random.Reset();
    116116      random.IntNumbers = new int[] { 2 };
    117       parent1 = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
    118       parent2 = new DoubleArrayData(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
     117      parent1 = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
     118      parent2 = new DoubleArray(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
    119119      exceptionFired = false;
    120120      try {
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/UniformOnePositionManipulatorTest.cs

    r2936 r3048  
    8585    public void UniformOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArrayData parent, expected;
    88       DoubleData min, max;
     87      DoubleArray parent, expected;
     88      DoubleValue min, max;
    8989      // The following test is not based on published examples
    9090      random.Reset();
    9191      random.IntNumbers = new int[] { 3 };
    9292      random.DoubleNumbers = new double[] { 0.2 };
    93       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    94       expected = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.3, 0.1 });
    95       min = new DoubleData(0.2);
    96       max = new DoubleData(0.7);
     93      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     94      expected = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.3, 0.1 });
     95      min = new DoubleValue(0.2);
     96      max = new DoubleValue(0.7);
    9797      UniformOnePositionManipulator.Apply(random, parent, min, max);
    9898      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
Note: See TracChangeset for help on using the changeset viewer.