Changeset 3231 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs
- Timestamp:
- 03/29/10 17:53:12 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs
r3063 r3231 70 70 try { 71 71 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 72 new Permutation( 4), new Permutation(4), new Permutation(4)}));72 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 73 73 } catch (System.InvalidOperationException) { 74 74 exceptionFired = true; … … 87 87 random.Reset(); 88 88 random.IntNumbers = new int[] { 5, 7 }; 89 parent1 = new Permutation( new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });89 parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }); 90 90 Assert.IsTrue(parent1.Validate()); 91 parent2 = new Permutation( new int[] { 2, 5, 6, 0, 9, 1, 3, 8, 4, 7 });91 parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 5, 6, 0, 9, 1, 3, 8, 4, 7 }); 92 92 Assert.IsTrue(parent2.Validate()); 93 expected = new Permutation( new int[] { 2, 0, 9, 1, 3, 5, 6, 7, 8, 4 });93 expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 0, 9, 1, 3, 5, 6, 7, 8, 4 }); 94 94 Assert.IsTrue(expected.Validate()); 95 95 actual = OrderCrossover2.Apply(random, parent1, parent2); … … 101 101 bool exceptionFired = false; 102 102 try { 103 OrderCrossover.Apply(random, new Permutation( 8), new Permutation(6));103 OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 104 104 } catch (System.ArgumentException) { 105 105 exceptionFired = true;
Note: See TracChangeset
for help on using the changeset viewer.