Changeset 4068 for trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs
r3909 r4068 21 21 22 22 using System; 23 using HeuristicLab.Common;24 23 using HeuristicLab.Core; 25 24 using HeuristicLab.Data; … … 74 73 if (alpha.Value < 0 || alpha.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter alpha must be in the range [0;1]", "alpha"); 75 74 if (probability.Value < 0 || probability.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter probability must be in the range [0;1]", "probability"); 76 75 77 76 RealVector result = new RealVector(length); 78 77 for (int i = 0; i < length; i++) { … … 92 91 /// <param name="parents">The collection of parents (must be of size 2).</param> 93 92 /// <returns>The vector resulting from the crossover.</returns> 94 protected override RealVector 93 protected override RealVector Cross(IRandom random, ItemArray<RealVector> parents) { 95 94 if (parents.Length != 2) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: There must be exactly two parents.", "parents"); 96 95 if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformSomePositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
Note: See TracChangeset
for help on using the changeset viewer.