Changeset 3231 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.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/OrderBasedCrossoverTest.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 } catch (System.InvalidOperationException) { 97 97 exceptionFired = true; … … 110 110 random.Reset(); 111 111 random.IntNumbers = new int[] { 3, 5, 2, 1 }; 112 parent1 = new Permutation( new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });112 parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }); 113 113 Assert.IsTrue(parent1.Validate()); 114 parent2 = new Permutation( new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });114 parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 }); 115 115 Assert.IsTrue(parent2.Validate()); 116 expected = new Permutation( new int[] { 1, 3, 2, 7, 6, 4, 5, 0 });116 expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 2, 7, 6, 4, 5, 0 }); 117 117 actual = OrderBasedCrossover.Apply(random, parent1, parent2); 118 118 Assert.IsTrue(actual.Validate()); … … 122 122 bool exceptionFired = false; 123 123 try { 124 OrderBasedCrossover.Apply(random, new Permutation( 8), new Permutation(6));124 OrderBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6)); 125 125 } catch (System.ArgumentException) { 126 126 exceptionFired = true;
Note: See TracChangeset
for help on using the changeset viewer.