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