Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/15/10 23:49:54 (14 years ago)
Author:
swagner
Message:

Renamed classes of HeuristicLab.Data (#909)

File:
1 edited

Legend:

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

    r2936 r3048  
    8585    public void MichalewiczNonUniformOnePositionManipulatorApplyTest() {
    8686      TestRandom random = new TestRandom();
    87       DoubleArrayData parent, expected;
    88       DoubleData min, max, generationsDependency;
    89       IntData currentGeneration, maximumGenerations;
     87      DoubleArray parent, expected;
     88      DoubleValue min, max, generationsDependency;
     89      IntValue currentGeneration, maximumGenerations;
    9090      bool exceptionFired;
    9191      // The following test is not based on published examples
     
    9393      random.IntNumbers = new int[] { 3 };
    9494      random.DoubleNumbers = new double[] { 0.2, 0.7 };
    95       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    96       expected = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.34, 0.1 });
    97       min = new DoubleData(0.3);
    98       max = new DoubleData(0.7);
    99       generationsDependency = new DoubleData(0.1);
    100       currentGeneration = new IntData(1);
    101       maximumGenerations = new IntData(4);
     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 });
     97      min = new DoubleValue(0.3);
     98      max = new DoubleValue(0.7);
     99      generationsDependency = new DoubleValue(0.1);
     100      currentGeneration = new IntValue(1);
     101      maximumGenerations = new IntValue(4);
    102102      MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
    103103      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
     
    107107      random.IntNumbers = new int[] { 3 };
    108108      random.DoubleNumbers = new double[] { 0.2, 0.7 };
    109       parent = new DoubleArrayData(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    110       min = new DoubleData(0.3);
    111       max = new DoubleData(0.7);
    112       generationsDependency = new DoubleData(0.1);
    113       currentGeneration = new IntData(5); //current generation > max generation
    114       maximumGenerations = new IntData(4);
     109      parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
     110      min = new DoubleValue(0.3);
     111      max = new DoubleValue(0.7);
     112      generationsDependency = new DoubleValue(0.1);
     113      currentGeneration = new IntValue(5); //current generation > max generation
     114      maximumGenerations = new IntValue(4);
    115115      try {
    116116        MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency);
Note: See TracChangeset for help on using the changeset viewer.