- Timestamp:
- 01/21/09 11:36:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.IntVector/DiscreteCrossover.cs
r1057 r1157 26 26 27 27 namespace HeuristicLab.IntVector { 28 /// <summary> 29 /// Discrete crossover for integer vectors. 30 /// </summary> 28 31 public class DiscreteCrossover : IntVectorCrossoverBase { 32 /// <inheritdoc select="summary"/> 29 33 public override string Description { 30 34 get { return "Discrete crossover for integer vectors."; } 31 35 } 32 36 37 /// <summary> 38 /// Performs a discrete crossover operation of the two given parents. 39 /// </summary> 40 /// <param name="random">A random number generator.</param> 41 /// <param name="parent1">The first parent for the crossover operation.</param> 42 /// <param name="parent2">The second parent for the crossover operation.</param> 43 /// <returns>The newly created integer vector, resulting from the crossover operation.</returns> 33 44 public static int[] Apply(IRandom random, int[] parent1, int[] parent2) { 34 45 int length = parent1.Length; … … 44 55 } 45 56 57 /// <summary> 58 /// Performs a discrete crossover operation of the two given parents. 59 /// </summary> 60 /// <param name="scope">The current scope.</param> 61 /// <param name="random">A random number generator.</param> 62 /// <param name="parent1">The first parent for the crossover operation.</param> 63 /// <param name="parent2">The second parent for the crossover operation.</param> 64 /// <returns>The newly created integer vector, resulting from the crossover operation.</returns> 46 65 protected override int[] Cross(IScope scope, IRandom random, int[] parent1, int[] parent2) { 47 66 return Apply(random, parent1, parent2);
Note: See TracChangeset
for help on using the changeset viewer.