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