Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/12 15:05:11 (12 years ago)
Author:
abeham
Message:

#1775: reintegrated branch

Location:
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs

    r7259 r8019  
    119119      parent2 = new IntegerVector(new int[] { 4, 1, 3, 2, 8 });
    120120      expected = new IntegerVector(new int[] { 2, 2, 3, 5, 8 });
    121       actual = DiscreteCrossover.Apply(random, parent1, parent2);
     121      actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 }));
    122122      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected));
    123123
     
    129129      exceptionFired = false;
    130130      try {
    131         actual = DiscreteCrossover.Apply(random, parent1, parent2);
     131        actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 }));
    132132      }
    133133      catch (System.ArgumentException) {
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs

    r7259 r8019  
    8787      TestRandom random = new TestRandom();
    8888      IntegerVector parent, expected;
    89       IntValue min, max;
     89      IntMatrix bounds = new IntMatrix(1, 2);
    9090      // The following test is not based on published examples
    9191      random.Reset();
     
    9393      parent = new IntegerVector(new int[] { 2, 2, 3, 5, 1 });
    9494      expected = new IntegerVector(new int[] { 2, 2, 3, 3, 1 });
    95       min = new IntValue(2);
    96       max = new IntValue(7);
    97       UniformOnePositionManipulator.Apply(random, parent, min, max);
     95      bounds[0, 0] = 2;
     96      bounds[0, 1] = 7;
     97      UniformOnePositionManipulator.Apply(random, parent, bounds);
    9898      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent));
    9999    }
Note: See TracChangeset for help on using the changeset viewer.