- Timestamp:
- 01/28/09 10:20:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.RealVector/SinglePointCrossover.cs
r2 r1184 26 26 27 27 namespace HeuristicLab.RealVector { 28 /// <summary> 29 /// Single point crossover for real vectors. 30 /// </summary> 28 31 public class SinglePointCrossover : RealVectorCrossoverBase { 32 /// <inheritdoc select="summary"/> 29 33 public override string Description { 30 34 get { return "Single point crossover for real vectors."; } 31 35 } 32 36 37 /// <summary> 38 /// Performs a single point crossover at a randomly chosen position of the two 39 /// given parent real vectors. 40 /// </summary> 41 /// <param name="random">A random number generator.</param> 42 /// <param name="parent1">The first parent for crossover.</param> 43 /// <param name="parent2">The second parent for crossover.</param> 44 /// <returns>The newly created real vector, resulting from the single point crossover.</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 single point crossover at a randomly chosen position of the two 60 /// given parent real vectors. 61 /// </summary> 62 /// <param name="scope">The current scope.</param> 63 /// <param name="random">A random number generator.</param> 64 /// <param name="parent1">The first parent for crossover.</param> 65 /// <param name="parent2">The second parent for crossover.</param> 66 /// <returns>The newly created real vector, resulting from the single point crossover.</returns> 46 67 protected override double[] Cross(IScope scope, IRandom random, double[] parent1, double[] parent2) { 47 68 return Apply(random, parent1, parent2);
Note: See TracChangeset
for help on using the changeset viewer.