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

    r3053 r3060  
    8585    public void PolynomialAllPositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArray parent, expected;
     87      RealVector parent, expected;
    8888      DoubleValue contiguity, maxManipulation;
    8989      bool exceptionFired;
     
    9191      random.Reset();
    9292      random.DoubleNumbers = new double[] { 0.2, 0.7, 0.8, 0.01, 0.1 };
    93       parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    94       expected = new DoubleArray(new double[] { 0.120213215256006, 0.336631954950876, 0.474551336679454, 0.322759240811056, -0.0182075293954083 });
     93      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     94      expected = new RealVector(new double[] { 0.120213215256006, 0.336631954950876, 0.474551336679454, 0.322759240811056, -0.0182075293954083 });
    9595      contiguity = new DoubleValue(0.8);
    9696      maxManipulation = new DoubleValue(0.2);
    9797      PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation);
    98       Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     98      Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent));
    9999      // The following test is not based on published examples
    100100      exceptionFired = false;
    101101      random.Reset();
    102102      random.DoubleNumbers = new double[] { 0.2, 0.7, 0.8, 0.01, 0.1 };
    103       parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     103      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    104104      contiguity = new DoubleValue(-1); //Contiguity value < 0
    105105      maxManipulation = new DoubleValue(0.2);
Note: See TracChangeset for help on using the changeset viewer.