Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/10 15:59:37 (14 years ago)
Author:
abeham
Message:

Updated RealVector encoding to use a double matrix as bounds #929

File:
1 edited

Legend:

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

    r3061 r3123  
    8686      TestRandom random = new TestRandom();
    8787      RealVector parent, expected;
    88       DoubleValue min, max;
     88      DoubleMatrix bounds;
    8989      // The following test is not based on published examples
    9090      random.Reset();
     
    9393      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
    9494      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.3, 0.1 });
    95       min = new DoubleValue(0.2);
    96       max = new DoubleValue(0.7);
    97       UniformOnePositionManipulator.Apply(random, parent, min, max);
     95      bounds = new DoubleMatrix(new double[,] { { 0.2, 0.7 } });
     96      UniformOnePositionManipulator.Apply(random, parent, bounds);
    9897      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
    9998    }
Note: See TracChangeset for help on using the changeset viewer.