Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/10 11:37:24 (15 years ago)
Author:
abeham
Message:

Updated real vector operators #890:
Added AverageCrossover, UniformAllPositionsArithmeticCrossover, and UniformSomePositionsArithmeticCrossover
Removed ContinuousCrossover, CompleteContinuousCrossover, and UniformAllPositionsManipulator
Updated the description and documentation in HeuristicCrossover, LocalCrossover, and RandomConvexCrossover

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/LocalCrossover.cs

    r2936 r2964  
    2929namespace HeuristicLab.Encodings.RealVector {
    3030  /// <summary>
    31   /// Local crossover for real vectors: Takes for each element the allele of the first parent times a
    32   /// always newly created randomly chosen factor and adds the allele of the second parent times (1 - the randomly chosen factor).
     31  /// The local crossover for real vectors is similar to the <see cref="UniformAllPositionsArithmeticCrossover"/>, but where the factor alpha is chosen randomly in the interval [0;1) for each position.
    3332  /// </summary>
    3433  /// <remarks>
    3534  /// It is implemented as described in Dumitrescu, D. et al. (2000), Evolutionary computation, CRC Press, Boca Raton, FL, p. 194.
    3635  /// </remarks>
    37   [Item("LocalCrossover", "Local crossover for real vectors: Takes for each element the allele of the first parent times a always newly created randomly chosen factor and adds the allele of the second parent times (1 - the randomly chosen factor. " +
    38     "It is implemented as described in Dumitrescu, D. et al. (2000), Evolutionary computation, CRC Press, Boca Raton, FL., p. 194.")]
     36  [Item("LocalCrossover", @"The local crossover is similar to the arithmetic all positions crossover, but uses a random alpha for each position x = alpha * p1 + (1-alpha) * p2. It is implemented as described in Dumitrescu, D. et al. (2000), Evolutionary computation, CRC Press, Boca Raton, FL., p. 194.")]
    3937  [EmptyStorableClass]
    4038  public class LocalCrossover : RealVectorCrossover {
     
    4947    public static DoubleArrayData Apply(IRandom random, DoubleArrayData parent1, DoubleArrayData parent2) {
    5048      if (parent1.Length != parent2.Length)
    51         throw new ArgumentException("ERROR in LocalCrossover: the two parents are not of the same length");
     49        throw new ArgumentException("LocalCrossover: the two parents are not of the same length");
    5250     
    5351      double factor;
     
    7068    /// <returns>The newly created real vector, resulting from the crossover operation.</returns>
    7169    protected override DoubleArrayData Cross(IRandom random, ItemArray<DoubleArrayData> parents) {
    72       if (parents.Length != 2) throw new ArgumentException("ERROR in LocalCrossover: The number of parents is not equal to 2");
     70      if (parents.Length != 2) throw new ArgumentException("LocalCrossover: The number of parents is not equal to 2");
    7371      return Apply(random, parents[0], parents[1]);
    7472    }
Note: See TracChangeset for help on using the changeset viewer.