Public Member Functions | |
Mutation (IMutation *mut, double ratio=0.125) | |
void | setRandom (Random *random) |
bool | apply (tChromosomeReal &sol) |
(for AGs).
Usage:
m_mutation->apply(sol);
Definition at line 37 of file mutation.h.
Mutation::Mutation | ( | IMutation * | mut, | |
double | ratio = 0.125 | |||
) |
Constructor.
mut | IMutation to be applied if it is decided | |
ratio | Ratio of individuals to be applied |
Definition at line 30 of file mutation.cc.
bool Mutation::apply | ( | tChromosomeReal & | sol | ) |
This method check if must be applied the chromosome, in that case it is updated.
Definition at line 42 of file mutation.cc.
void Mutation::setRandom | ( | Random * | random | ) |
Set the random variable
It must be speficied if Mutation is going to use it.
random | the random generation numbers. |
Definition at line 67 of file mutation.cc.