Changeset 3048 for trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/AverageCrossover.cs
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Crossovers/AverageCrossover.cs
r3017 r3048 45 45 /// <param name="parents">The list of parents.</param> 46 46 /// <returns>The child vector (average) of the parents.</returns> 47 public static DoubleArray Data Apply(IRandom random, ItemArray<DoubleArrayData> parents) {47 public static DoubleArray Apply(IRandom random, ItemArray<DoubleArray> parents) { 48 48 int length = parents[0].Length, parentsCount = parents.Length; 49 49 if (parents.Length < 2) throw new ArgumentException("AverageCrossover: The number of parents is less than 2.", "parents"); 50 DoubleArray Data result = new DoubleArrayData(length);50 DoubleArray result = new DoubleArray(length); 51 51 try { 52 52 double avg; … … 65 65 66 66 /// <summary> 67 /// Forwards the call to <see cref="Apply(IRandom, ItemArray<DoubleArray Data>)"/>.67 /// Forwards the call to <see cref="Apply(IRandom, ItemArray<DoubleArray>)"/>. 68 68 /// </summary> 69 69 /// <param name="random">The random number generator.</param> 70 70 /// <param name="parents">The list of parents.</param> 71 71 /// <returns>The child vector (average) of the parents.</returns> 72 protected override DoubleArray Data Cross(IRandom random, ItemArray<DoubleArrayData> parents) {72 protected override DoubleArray Cross(IRandom random, ItemArray<DoubleArray> parents) { 73 73 return Apply(random, parents); 74 74 }
Note: See TracChangeset
for help on using the changeset viewer.