- Timestamp:
- 11/28/08 10:32:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Permutation/PartiallyMatchedCrossover.cs
r2 r850 27 27 28 28 namespace HeuristicLab.Permutation { 29 /// <summary> 30 /// Performs a cross over permutation between two permuation arrays 31 /// by taking a randomly chosen interval from the first, keeping the position, 32 /// then all positions from the second permutation which are still free in the child 33 /// (the position is free and the value is "free") 34 /// and then missing ones from the second array in the order they occur in the second array. 35 /// </summary> 29 36 public class PartiallyMatchedCrossover : PermutationCrossoverBase { 37 /// <inheritdoc select="summary"/> 30 38 public override string Description { 31 39 get { return @"TODO\r\nOperator description still missing ..."; } 32 40 } 33 41 42 /// <summary> 43 /// Performs a cross over permuation of <paramref name="parent1"/> and <paramref name="parent2"/> 44 /// by taking a randomly chosen interval from <paramref name="parent1"/>, preserving the position, 45 /// then all positions from <paramref name="parent2"/> which are still free in the child 46 /// (the position is free and the value is "free") 47 /// and then missing ones from <paramref name="parent2"/> in the order they occur 48 /// in <paramref name="parent2"/>. 49 /// </summary> 50 /// <param name="random">The random number generator.</param> 51 /// <param name="parent1">The parent scope 1 to cross over.</param> 52 /// <param name="parent2">The parent scope 2 to cross over.</param> 53 /// <returns>The created cross over permutation as int array.</returns> 34 54 public static int[] Apply(IRandom random, int[] parent1, int[] parent2) { 35 55 int length = parent1.Length; … … 66 86 } 67 87 88 /// <summary> 89 /// Performs a cross over permuation of <paramref name="parent1"/> and <paramref name="parent2"/> 90 /// by taking a randomly chosen interval from <paramref name="parent1"/>, preserving the position, 91 /// then all positions from <paramref name="parent2"/> which are still free in the child 92 /// (the position is free and the value is "free") 93 /// and then missing ones from <paramref name="parent2"/> in the order they occur 94 /// in <paramref name="parent2"/>. 95 /// </summary> 96 /// <remarks>Calls <see cref="Apply"/>.</remarks> 97 /// <param name="scope">The current scope.</param> 98 /// <param name="random">The random number generator.</param> 99 /// <param name="parent1">The parent scope 1 to cross over.</param> 100 /// <param name="parent2">The parent scope 2 to cross over.</param> 101 /// <returns>The created cross over permutation as int array.</returns> 68 102 protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) { 69 103 return Apply(random, parent1, parent2);
Note: See TracChangeset
for help on using the changeset viewer.