Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/16/10 10:46:59 (14 years ago)
Author:
svonolfe
Message:

Updated the RealVector project to use the new solution encodings (#909)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs

    r3053 r3060  
    8585    public void MichalewiczNonUniformOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArray parent, expected;
     87      RealVector parent, expected;
    8888      DoubleValue min, max, generationsDependency;
    8989      IntValue currentGeneration, maximumGenerations;
     
    9393      random.IntNumbers = new int[] { 3 };
    9494      random.DoubleNumbers = new double[] { 0.2, 0.7 };
    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 });
     95      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     96      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.34, 0.1 });
    9797      min = new DoubleValue(0.3);
    9898      max = new DoubleValue(0.7);
     
    101101      maximumGenerations = new IntValue(4);
    102102      MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    103       Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     103      Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
    104104      // The following test is not based on published examples
    105105      exceptionFired = false;
     
    107107      random.IntNumbers = new int[] { 3 };
    108108      random.DoubleNumbers = new double[] { 0.2, 0.7 };
    109       parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     109      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110110      min = new DoubleValue(0.3);
    111111      max = new DoubleValue(0.7);
Note: See TracChangeset for help on using the changeset viewer.