The Crossover structure that encapsulates the crossover operation and its configuration in evolutionary algorithm.  
 More...
#include <Crossover.hh>
|  | 
| std::vector< std::unique_ptr< EvoScript > > | populationAfter {} | 
|  | Population after the crossover operation is performed.  More... 
 | 
|  | 
| double | crossoverIndividualRate = 0.0 | 
|  | Average rate of crossover. If N is the population.size(), then around (N*crossoverIndividualRate) children will be produced. 
 | 
|  | 
| CrossoverSelectionType | selectionType = CrossoverSelectionType::RANDOM | 
|  | The method that chooses parents to be recombined. 
 | 
|  | 
| double | pseudoRouletteRandomPortion = 0.0 | 
|  | Pseudoroullete selects pseudoRouletteRandomPortion individuals at random and 1-pseudoRouletteRandomPortion according to roulette. 
 | 
|  | 
| double | crossoverPhaseRate = 0.0 | 
|  | Probability of a crossover phase to happen (globally). If a crossover is included in the algorithm, this value should most likely be equal to 1.0. 
 | 
|  | 
|  | 
| virtual void | CrossoverFunctionOnePoint (EvoScript &individual1, EvoScript &individual2) | 
|  | 
| virtual void | CrossoverFunctionMultiPoint (EvoScript &individual1, EvoScript &individual2, size_t length) | 
|  | 
| virtual void | CrossoverIndividuals (EvoScript &individual1, EvoScript &individual2) | 
|  | 
The Crossover structure that encapsulates the crossover operation and its configuration in evolutionary algorithm. 
◆ Crossover()
      
        
          | grail::evolution::Crossover::Crossover | ( | double | crossoverIndividualRate = 0.45, | 
        
          |  |  | CrossoverSelectionType | selectionType = CrossoverSelectionType::PSEUDO_ROULETTE, | 
        
          |  |  | double | pseudoRouletteRandomPortion = 0.3, | 
        
          |  |  | double | crossoverPhaseRate = 1.0, | 
        
          |  |  | std::mt19937_64::result_type | seed = std::random_device{}() | 
        
          |  | ) |  |  | 
      
 
Crossover - Constructor. 
- Parameters
- 
  
    | crossoverIndividualRate | - average rate of crossover. If N is the population.size(), then around (N*crossoverIndividualRate) children will be produced. |  | selectionType | - the method that chooses parents to be recombined. See CrossoverSelectionType. |  | pseudoRouletteRandomPortion | - pseudoroullete selects pseudoRouletteRandomPortion individuals at random and 1-pseudoRouletteRandomPortion according to roulette. |  | crossoverPhaseRate | - probability of a crossover phase to happen (globally). If a crossover is included in the algorithm, this value should most likely be equal to 1.0. |  | seed | - initial seed for random numbers generator. |  
 
 
 
◆ Perform()
      
        
          | void grail::evolution::Crossover::Perform | ( | const std::vector< std::unique_ptr< EvoScript >> & | inputPopulation | ) |  | 
      
 
Perform - the function that performs the crossover phase. 
- Parameters
- 
  
    | inputPopulation | - the population containing individuals that are candidates for the crossover. Please note that the crossover might not choose all individuals depending on its configuration. |  
 
 
 
◆ populationAfter
      
        
          | std::vector<std::unique_ptr<EvoScript> > grail::evolution::Crossover::populationAfter {} | 
      
 
Population after the crossover operation is performed. 
 
 
The documentation for this struct was generated from the following files: