Changeset 4872 for trunk/sources/HeuristicLab.Encodings.RealVectorEncoding
- Timestamp:
- 11/20/10 16:21:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SimulatedBinaryCrossoverTest.cs
r4068 r4872 98 98 RealVector actual; 99 99 actual = target.Cross(random, parents); 100 } 101 catch (System.ArgumentException) { 100 } catch (System.ArgumentException) { 102 101 exceptionFired = true; 103 102 } … … 110 109 RealVector actual; 111 110 actual = target.Cross(random, parents); 112 } 113 catch (System.ArgumentException) { 111 } catch (System.ArgumentException) { 114 112 exceptionFired = true; 115 113 } … … 132 130 parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 }); 133 131 parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 }); 134 expected = new RealVector(new double[] { 1.11032829834638, -0.0145477755417797, 0.3, 0.5, 0.1 });132 expected = new RealVector(new double[] { 0.644880972204315, 0.0488239539275703, 0.3, 0.5, 0.1 }); 135 133 actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity); 136 134 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); … … 144 142 try { 145 143 actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity); 146 } 147 catch (System.ArgumentException) { 144 } catch (System.ArgumentException) { 148 145 exceptionFired = true; 149 146 } … … 158 155 try { 159 156 actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity); 160 } 161 catch (System.ArgumentException) { 157 } catch (System.ArgumentException) { 162 158 exceptionFired = true; 163 159 }
Note: See TracChangeset
for help on using the changeset viewer.