Mutation class - handles mutation of _individuals_ (as opposed to MutationOp class that mutates genotypes). More...
#include <Mutation.h>
Public Member Functions | |
| bool | mutate (IndividualP ind) |
| Mutate an individual. | |
| uint | mutation (const std::vector< IndividualP > &) |
| Perform mutation on a pool of individuals. | |
| void | registerParameters (StateP) |
| bool | initialize (StateP) |
Public Attributes | |
|
std::vector< std::vector < MutationOpP > > | operators |
| vectors of mutation operators for each genotype | |
|
std::vector< std::vector < double > > | opProb |
| usage probabilities for each MutationOp operator | |
| IndividualP | currentInd |
Protected Attributes | |
| StateP | state_ |
| double | indMutProb_ |
| mutation probability of an individual | |
| double | geneMutProb_ |
| uint | mutateGenotypes_ |
| what genotypes (if more than one) to mutate (random, all) | |
| std::vector< bool > | protectedGenotypes_ |
| protected (non-mutatable) genotypes flags | |
Mutation class - handles mutation of _individuals_ (as opposed to MutationOp class that mutates genotypes).
Contains pointers to every MutationOp for every genotype used in individuals. Determines which MutationOp will be used for each genotype.
Definition at line 55 of file Mutation.h.
| bool Mutation::mutate | ( | IndividualP | ind | ) |
Mutate an individual.
May mutate one or more genotypes in given individual. Determines which MutationOp to use on each genotype.
Definition at line 124 of file Mutation.cpp.
| uint Mutation::mutation | ( | const std::vector< IndividualP > & | pool | ) |
Perform mutation on a pool of individuals.
Mutation probability may be defined with 2 parameters:
Called by: Algorithm::advanceGeneration
Definition at line 104 of file Mutation.cpp.
1.7.1