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

    r3053 r3060  
    8585    public void MichalewiczNonUniformAllPositionsManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArray parent, expected;
     87      RealVector parent, expected;
    8888      DoubleValue min, max, generationsDependency;
    8989      IntValue currentGeneration, maximumGenerations;
     
    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 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 });
     94      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     95      expected = new RealVector(new double[] { 0.45, 0.22, 0.3, 0.6, 0.14 });
    9696      min = new DoubleValue(0.3);
    9797      max = new DoubleValue(0.7);
     
    100100      maximumGenerations = new IntValue(4);
    101101      MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    102       Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     102      Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
    103103      // The following test is not based on published examples
    104104      exceptionFired = false;
    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 DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     107      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    108108      min = new DoubleValue(0.3);
    109109      max = new DoubleValue(0.7);
Note: See TracChangeset for help on using the changeset viewer.