Changeset 3231 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs
- Timestamp:
- 03/29/10 17:53:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs
r3063 r3231 93 93 try { 94 94 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 95 new Permutation( 4), new Permutation(4), new Permutation(4)}));95 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 96 96 } 97 97 catch (System.InvalidOperationException) { … … 111 111 random.Reset(); 112 112 random.IntNumbers = new int[] { 3, 2 }; 113 parent1 = new Permutation( new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });113 parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }); 114 114 Assert.IsTrue(parent1.Validate()); 115 parent2 = new Permutation( new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });115 parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 }); 116 116 Assert.IsTrue(parent2.Validate()); 117 expected = new Permutation( new int[] { 1, 0, 2, 3, 4, 5, 7, 6 });117 expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 0, 2, 3, 4, 5, 7, 6 }); 118 118 Assert.IsTrue(expected.Validate()); 119 119 actual = MaximalPreservativeCrossover.Apply(random, parent1, parent2); … … 125 125 bool exceptionFired = false; 126 126 try { 127 MaximalPreservativeCrossover.Apply(random, new Permutation( 8), new Permutation(6));127 MaximalPreservativeCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 128 128 } 129 129 catch (System.ArgumentException) {
Note: See TracChangeset
for help on using the changeset viewer.