- Timestamp:
- 06/18/12 10:04:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs
r8019 r8023 47 47 /// Performs a discrete crossover operation of any number of given parents. 48 48 /// </summary> 49 /// <exception cref="ArgumentException">Thrown when the vectors of the parents are of different length .</exception>49 /// <exception cref="ArgumentException">Thrown when the vectors of the parents are of different length or when there are less than 2 parents.</exception> 50 50 /// <param name="random">A random number generator.</param> 51 51 /// <param name="parents">The list of parents for the crossover operation.</param> 52 52 /// <returns>The newly created integer vector, resulting from the crossover operation.</returns> 53 53 public static IntegerVector Apply(IRandom random, ItemArray<IntegerVector> parents) { 54 if (parents.Length < 2) throw new ArgumentException("DiscreteCrossover: There are less than two parents to cross."); 54 55 int length = parents[0].Length; 55 56
Note: See TracChangeset
for help on using the changeset viewer.