Free cookie consent management tool by TermsFeed Policy Generator

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

Renamed classes of HeuristicLab.Data (#909)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.IntVector/3.3/Tests/SinglePointCrossoverTest.cs

    r3032 r3048  
    6868    public void SinglePointCrossoverCrossTest() {
    6969      SinglePointCrossover_Accessor target = new SinglePointCrossover_Accessor(new PrivateObject(typeof(SinglePointCrossover)));
    70       ItemArray<IntArrayData> parents;
     70      ItemArray<IntArray> 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<IntArrayData>(new IntArrayData[] { new IntArrayData(5), new IntArrayData(6), new IntArrayData(4) });
     75      parents = new ItemArray<IntArray>(new IntArray[] { new IntArray(5), new IntArray(6), new IntArray(4) });
    7676      exceptionFired = false;
    7777      try {
    78         IntArrayData actual;
     78        IntArray 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<IntArrayData>(new IntArrayData[] { new IntArrayData(4) });
     87      parents = new ItemArray<IntArray>(new IntArray[] { new IntArray(4) });
    8888      exceptionFired = false;
    8989      try {
    90         IntArrayData actual;
     90        IntArray actual;
    9191        actual = target.Cross(random, parents);
    9292      } catch (System.ArgumentException) {
     
    102102    public void SinglePointCrossoverApplyTest() {
    103103      TestRandom random = new TestRandom();
    104       IntArrayData parent1, parent2, expected, actual;
     104      IntArray 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 IntArrayData(new int[] { 2, 2, 3, 5, 1 });
    110       parent2 = new IntArrayData(new int[] { 4, 1, 3, 2, 8 });
    111       expected = new IntArrayData(new int[] { 2, 2, 3, 2, 8 });
     109      parent1 = new IntArray(new int[] { 2, 2, 3, 5, 1 });
     110      parent2 = new IntArray(new int[] { 4, 1, 3, 2, 8 });
     111      expected = new IntArray(new int[] { 2, 2, 3, 2, 8 });
    112112      actual = SinglePointCrossover.Apply(random, parent1, parent2);
    113113      Assert.IsTrue(Auxiliary.IntVectorIsEqualByPosition(actual, expected));
     
    115115      random.Reset();
    116116      random.IntNumbers = new int[] { 2 };
    117       parent1 = new IntArrayData(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
    118       parent2 = new IntArrayData(new int[] { 4, 1, 3, 2, 8 });
     117      parent1 = new IntArray(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
     118      parent2 = new IntArray(new int[] { 4, 1, 3, 2, 8 });
    119119      exceptionFired = false;
    120120      try {
Note: See TracChangeset for help on using the changeset viewer.