Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/18/12 10:04:24 (12 years ago)
Author:
abeham
Message:

#1775: fixed unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs

    r8019 r8023  
    4747    /// Performs a discrete crossover operation of any number of given parents.
    4848    /// </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>
    5050    /// <param name="random">A random number generator.</param>
    5151    /// <param name="parents">The list of parents for the crossover operation.</param>
    5252    /// <returns>The newly created integer vector, resulting from the crossover operation.</returns>
    5353    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.");
    5455      int length = parents[0].Length;
    5556
Note: See TracChangeset for help on using the changeset viewer.