Interface CrossoverOperator<T extends GASolution<T>>

All Known Implementing Classes:
UniformBlendCrossover

public interface CrossoverOperator<T extends GASolution<T>>
Interface for crossover operators in genetic algorithms. A crossover operator defines how two parents are combined to produce one or more children. The GA will call this interface to perform crossover between selected parents.
  • Method Summary

    Modifier and Type
    Method
    Description
    crossover(T parent1, T parent2, Random rng)
    Combine two parents into one or more new children.
  • Method Details

    • crossover

      List<T> crossover(T parent1, T parent2, Random rng)
      Combine two parents into one or more new children.
      Parameters:
      parent1 - first selected parent
      parent2 - second selected parent
      rng - source of randomness
      Returns:
      non-null, non-empty list of non-null children