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

    r3053 r3060  
    8585    public void PolynomialOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArray parent, expected;
     87      RealVector parent, expected;
    8888      DoubleValue contiguity, maxManipulation;
    8989      bool exceptionFired;
     
    9292      random.IntNumbers = new int[] { 3 };
    9393      random.DoubleNumbers = new double[] { 0.2 };
    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 });
     94      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     95      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.1261980542102, 0.1 });
    9696      contiguity = new DoubleValue(0.2);
    9797      maxManipulation = new DoubleValue(0.7);
    9898      PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
    99       Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     99      Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
    100100      // The following test is not based on published examples
    101101      exceptionFired = false;
     
    103103      random.IntNumbers = new int[] { 3 };
    104104      random.DoubleNumbers = new double[] { 0.2 };
    105       parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     105      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    106106      contiguity = new DoubleValue(-1); //Contiguity value < 0
    107107      maxManipulation = new DoubleValue(0.2);
Note: See TracChangeset for help on using the changeset viewer.