Changeset 3231 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.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/CyclicCrossover2Test.cs
r3063 r3231 71 71 try { 72 72 target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 73 new Permutation( 4), new Permutation(4), new Permutation(4)}));73 new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)})); 74 74 } catch (System.InvalidOperationException) { 75 75 exceptionFired = true; … … 88 88 random.Reset(); 89 89 random.IntNumbers = new int[] { 0 }; 90 parent1 = new Permutation( new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });90 parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }); 91 91 Assert.IsTrue(parent1.Validate()); 92 parent2 = new Permutation( new int[] { 2, 5, 6, 0, 7, 1, 3, 8, 4, 9 });92 parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 5, 6, 0, 7, 1, 3, 8, 4, 9 }); 93 93 Assert.IsTrue(parent2.Validate()); 94 expected = new Permutation( new int[] { 0, 5, 2, 3, 7, 1, 6, 8, 4, 9 });94 expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 5, 2, 3, 7, 1, 6, 8, 4, 9 }); 95 95 Assert.IsTrue(expected.Validate()); 96 96 actual = CyclicCrossover2.Apply(random, parent1, parent2); … … 102 102 bool exceptionFired = false; 103 103 try { 104 CyclicCrossover.Apply(random, new Permutation( 8), new Permutation(6));104 CyclicCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 105 105 } catch (System.ArgumentException) { 106 106 exceptionFired = true;
Note: See TracChangeset
for help on using the changeset viewer.