Changeset 3060 for trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs
- Timestamp:
- 03/16/10 10:46:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs
r3053 r3060 85 85 public void MichalewiczNonUniformOnePositionManipulatorApplyTest() { 86 86 TestRandom random = new TestRandom(); 87 DoubleArrayparent, expected;87 RealVector parent, expected; 88 88 DoubleValue min, max, generationsDependency; 89 89 IntValue currentGeneration, maximumGenerations; … … 93 93 random.IntNumbers = new int[] { 3 }; 94 94 random.DoubleNumbers = new double[] { 0.2, 0.7 }; 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 });95 parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 }); 96 expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.34, 0.1 }); 97 97 min = new DoubleValue(0.3); 98 98 max = new DoubleValue(0.7); … … 101 101 maximumGenerations = new IntValue(4); 102 102 MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency); 103 Assert.IsTrue(Auxiliary. RealVectorIsAlmostEqualByPosition(expected, parent));103 Assert.IsTrue(Auxiliary.DoubleArrayIsAlmostEqualByPosition(expected, parent)); 104 104 // The following test is not based on published examples 105 105 exceptionFired = false; … … 107 107 random.IntNumbers = new int[] { 3 }; 108 108 random.DoubleNumbers = new double[] { 0.2, 0.7 }; 109 parent = new DoubleArray(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });109 parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 }); 110 110 min = new DoubleValue(0.3); 111 111 max = new DoubleValue(0.7);
Note: See TracChangeset
for help on using the changeset viewer.