7typedef boost::shared_ptr<Individual> IndividualP;
9typedef boost::shared_ptr<Genotype> GenotypeP;
28 virtual bool mate(GenotypeP, GenotypeP, GenotypeP) = 0;
45typedef boost::shared_ptr<CrossoverOp> CrossoverOpP;
59 bool mate(IndividualP ind1, IndividualP ind2, IndividualP child);
64 std::vector< std::vector<double> >
opProb;
71typedef boost::shared_ptr<Crossover> CrossoverP;
Crossover class - handles crossover of individuals (as opposed to CrossoverOp class that crosses geno...
void registerParameters(StateP)
Register crossover related but Genotype unrelated parameters.
uint crxGenotypes_
what genotypes (if more than one) to cross (random, all)
std::vector< bool > protectedGenotypes_
protected (non-crossable) genotypes flags
bool mate(IndividualP ind1, IndividualP ind2, IndividualP child)
Crosses 2 individuals.
std::vector< std::vector< double > > opProb
usage probabilities for each CrossoverOp operator
bool initialize(StateP)
Initialize all crossover operators of all active genotypes.
std::vector< std::vector< CrossoverOpP > > operators
vectors of crx operators for each genotype
double probability_
probability of usage of this crossover operator
GenotypeP myGenotype_
pointer to the Genotype that defines this CrossoverOp
virtual void registerParameters(StateP)
Register parameters with the system. Called before CrossoverOp::initialize.
virtual bool initialize(StateP)
Initialize crossover operator. Called before first crossover operation.
virtual bool mate(GenotypeP, GenotypeP, GenotypeP)=0
Individual class - inherits a vector of Genotype objects.