Changeset 3048 for trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/PolynomialOnePositionManipulatorTest.cs
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Tests/PolynomialOnePositionManipulatorTest.cs
r2936 r3048 85 85 public void PolynomialOnePositionManipulatorApplyTest() { 86 86 TestRandom random = new TestRandom(); 87 DoubleArray Dataparent, expected;88 Double Datacontiguity, maxManipulation;87 DoubleArray parent, expected; 88 DoubleValue contiguity, maxManipulation; 89 89 bool exceptionFired; 90 90 // The following test is not based on published examples … … 92 92 random.IntNumbers = new int[] { 3 }; 93 93 random.DoubleNumbers = new double[] { 0.2 }; 94 parent = new DoubleArray Data(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });95 expected = new DoubleArray Data(new double[] { 0.2, 0.2, 0.3, 0.1261980542102, 0.1 });96 contiguity = new Double Data(0.2);97 maxManipulation = new Double Data(0.7);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 }); 96 contiguity = new DoubleValue(0.2); 97 maxManipulation = new DoubleValue(0.7); 98 98 PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation); 99 99 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent)); … … 103 103 random.IntNumbers = new int[] { 3 }; 104 104 random.DoubleNumbers = new double[] { 0.2 }; 105 parent = new DoubleArray Data(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });106 contiguity = new Double Data(-1); //Contiguity value < 0107 maxManipulation = new Double Data(0.2);105 parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 }); 106 contiguity = new DoubleValue(-1); //Contiguity value < 0 107 maxManipulation = new DoubleValue(0.2); 108 108 try { 109 109 PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
Note: See TracChangeset
for help on using the changeset viewer.