Crossover class - handles crossover of _individuals_ (as opposed to CrossoverOp class that crosses genotypes). More...
#include <Crossover.h>
Public Member Functions | |
| bool | mate (IndividualP ind1, IndividualP ind2, IndividualP child) |
| Crosses 2 individuals. | |
| void | registerParameters (StateP) |
| bool | initialize (StateP) |
Public Attributes | |
|
std::vector< std::vector < CrossoverOpP > > | operators |
| vectors of crx operators for each genotype | |
|
std::vector< std::vector < double > > | opProb |
| usage probabilities for each CrossoverOp operator | |
Protected Attributes | |
| StateP | state_ |
| uint | crxGenotypes_ |
| what genotypes (if more than one) to cross (random, all) | |
| std::vector< bool > | protectedGenotypes_ |
| protected (non-mutatable) genotypes flags | |
Crossover class - handles crossover of _individuals_ (as opposed to CrossoverOp class that crosses genotypes).
Contains pointers to every CrossoverOp for every genotype used in individuals. Determines which CrossoverOp will be used for each genotype.
Definition at line 57 of file Crossover.h.
| bool Crossover::mate | ( | IndividualP | ind1, | |
| IndividualP | ind2, | |||
| IndividualP | child | |||
| ) |
Crosses 2 individuals.
If any of the parent individuals is also the child, makes a copy of that individual. Determines which CrossoverOp will be used to cross each genotype.
Definition at line 87 of file Crossover.cpp.
1.7.1